Как указано slackline
, 1 - это номер строки.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * За из-за того, что вы выполнили этот оператор SQL:
SELECT CASE WHEN MAX(date) = current_date-1 then TRUE else FALSE end as x from table
Вы видите, что там as x
?Это x
, который вы ищете.
Вы можете превратить ваш результат, который представляет собой список данных, в один кадр данных, подобный этому:
# this is the `res` from your example, with some example data
res <- list("datawarehouse.table1" = data.frame("x" = c(TRUE)),
"datawarehouse.table2" = data.frame("x" = c(FALSE)),
"datawarehouse.table3" = data.frame("x" = c(TRUE)))
# the names of the list items should be the values in the new column
table_names <- list("table" = names(res))
res <- do.call(rbind, res)
# get rid of the row names, will have integer indexes instead
rownames(res) <- NULL
# add a new column with the table names
# you could use stringr::str_extract to only pull out the portion you need
res<- cbind(res, table_names)