| dbTableStructure | R Documentation |
A more informative version of DBI::dbListTables() which only
contains table names. This functions also pairs each table with its schema
and can handle checking if the table has spatial data and identify if it
is a view.
dbTableStructure(
conn,
addGeoIndicator = FALSE,
includeViews = TRUE,
rmTableRegex = c("^[:alpha:][:digit:]+$", "^SDE_"),
rmSchemaRegex = c("sde")
)
conn |
A |
addGeoIndicator |
TRUE/FALSE. Should the |
includeViews |
TRUE/FALSE. Should output included views? |
rmTableRegex |
Character vector containing table names to avoid searching (removed table regex). Ignores some tables that are only used by the ESRI SDE bindings that don't actually contain user created data. |
rmSchemaRegex |
Character vector containing schema to avoid searching (removed schema regex). Ignores some default system level schema and schema only used by the ESRI SDE bindings that don't actually contain user created tables. |
A dataframe with a row for each table in the database connection. Contains 4 or 5 columns ('Database', 'Schema', 'Table', 'isView', and optionally 'isSpatial'). The return dataframe can then easily be searched, filtered, and queried to find the tables you were looking for.
Jacob Peterson
## Not run:
conn <- connectODBC("<servername>.<databaseName>.<schemaName>")
#This is not set up to be a real example
tables <- dbListTableStructure(conn, addGeoIndicator = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.