Last active
June 15, 2022 11:12
-
-
Save krlmlr/240939cd629d1bf8b88658c40301200b to your computer and use it in GitHub Desktop.
Script to query information_schema.columns with DBI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect to your database here | |
con <- DBI::dbConnect(duckdb::duckdb()) | |
# I'd be especially interested in getting a dump of this data! | |
columns <- DBI::dbGetQuery(con, "SELECT * FROM information_schema.columns WHERE LOWER(table_schema) = 'information_schema'") | |
columns | |
write.csv(columns, "columns.csv", na = "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment