Skip to content

Instantly share code, notes, and snippets.

@krlmlr
Last active June 15, 2022 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krlmlr/240939cd629d1bf8b88658c40301200b to your computer and use it in GitHub Desktop.
Save krlmlr/240939cd629d1bf8b88658c40301200b to your computer and use it in GitHub Desktop.
Script to query information_schema.columns with DBI
# 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