SQL Commands
These commands help diagnose SQL connectivity and data issues directly from the shell: testing a tenant’s stored SQL connection, running a SQL Passthrough Dataset (SQLPTDS) artifact, and running an ad hoc SQL statement.
Test a Stored SQL Connection
Test that a tenant’s stored SQL connection artifact can actually connect:
dshell/SAMPLE:>test-connection --connection-id MyConnection
Execute a Stored SQLPTDS
Execute a stored SQL Passthrough Dataset artifact by ID, optionally supplying token values and printing results:
dshell/SAMPLE:>dataset --id MyDataset --print
dshell/SAMPLE:>dataset --id MyDataset --params Scenario=Actual Year=2024 --print
--repeat runs the dataset multiple times in a row (defaults to 1), and --concurrent executes it in concurrent mode. Token values are logged for each underlying query as they are discovered, which is useful for confirming a SQLPTDS’s expected tokens are all being supplied.
Run an Ad Hoc SQL Statement
Run a SQL statement against the currently connected repository database connection (the connection established with connect), not against a tenant’s configured SQL connection:
dshell/:>sql --query "select count(*) from dodeca_binary_artifact"
-c controls the printed column width for result sets (defaults to 24).