Get dimensions and first few column names of tables and views in a database.
dbOverview(channel, schema ="dbo", dim =TRUE, peek =2,...)
Arguments
channel: an RODBC connection.
schema: database schema.
dim: whether to calculate the number of rows and columns for each table/view.
peek: how many column names to show. The value FALSE has the same effect as zero.
...: passed to sqlTables.
Returns
Data frame containing six columns: - Name: name of table/view.
Schema: database schema.
Type: type of table/view.
Rows: number of rows.
Cols: number of columns.
First: first column names.
Details
The dim = FALSE option results in faster computation, but the Rows and Cols columns will only contain NA values. Similarly, the peek = FALSE results in faster computation, but the First column will only contain NA values. These options can be useful to get a quick overview of a large database.
Examples
## Not run:con <- odbcConnect("myDatabase")dbOverview(con)dbOverview(con, dim=FALSE, peek=FALSE)## End(Not run)
See Also
sqlTables is the underlying function used to get the list of tables/views, tableDim is used to count rows and columns, and sqlColumns is used to peek at the first column names.
dbStorage shows the storage size of tables and dbTime shows the time when tables/views were created and last modified.