dap listdb
Lists table information stored in the local database
With the dap listdb command you can get an overview of the current state of table replication in the local database. It lists the status of all tables in the namespace including meta information and the record count. Tables are grouped by replication status and the appropriate command to use is shown: either initdb or syncdb.
The timestamp stored in the table metadata is displayed as column Data as of to indicate that this is neither the last replication time nor the last database record update time. This is sent by the DAP data warehouse when an initdb or syncdb is performed and is the timestamp at which the last changes were added to the warehouse for that table and its value depends on the latency in the DAP data pipeline. Total latency is displayed in column Staleness, its the combination of the latency of the backend data pipeline and the delay of the client querying the backend.
Usage
dap [arguments] listdb [flags]Options
--namespace <string>
Specifies the data source (namespace). Available options: {canvas, canvas_logs, catalog, new_quizzes}.
--omit-not-replicated
Omit tables that have not been replicated locally.
--omit-record-count
Skip querying record counts for each local table.
Global options
--client-id <string>
Client ID obtained from the Identity Service. Skip, if DAP_CLIENT_ID environment variable is set.
--client-secret <string>
Client Secret obtained from the Identity Service. Skip, if DAP_CLIENT_SECRET environment variable is set.
--connection-string <string>
The connection string used to connect to the target database. It must follow RFC 3986 format:
dialect://username:password@host:port/database. Skip, if DAP_CONNECTION_STRING environment variable is set.
-h, --help
Displays help information for the command.
Examples
List table info of all tables in namespace canvas:
$ dap listdb --namespace canvas
Omit not replicated tables from the output:
$ dap listdb --namespace canvas --omit-not-replicated
Skip querying of table sizes if count(*) performance is bad:
$ dap listdb --namespace canvas --omit-record-count
Output data in JSON format to use in scripts:
$ dap --non-interactive listdb --namespace canvas
Related Resources
Last updated
Was this helpful?