Reverse engineer a table from its description from a SQL query
Source:R/create_table.R
create_table.Rd
Reverse engineer a table from its description from a SQL query
Details
The table to create derives its name from the TABLE_NAME column and the columns from the COLUMN_NAME column. Overall, the output comes from an Oracle DB
Examples
# mockup table descritpion
(tbl_descr <- tibble::tibble(TABLE_NAME = c("my_table"),
COLUMN_NAME = c("var1", "var2", "var3")))
#> # A tibble: 3 × 2
#> TABLE_NAME COLUMN_NAME
#> <chr> <chr>
#> 1 my_table var1
#> 2 my_table var2
#> 3 my_table var3
# now print the table
if (FALSE) create_table(tbl_descr) # \dontrun{}