@@ -119,6 +119,46 @@ A running or completed SQLBuild CLI subprocess.
1191195 . If the DAG artifact is available, results are matched to the correct Dagster asset keys
1201206 . Raises ` Failure ` if the process exited non-zero and ` raise_on_error ` is set
121121
122+ ### Logs
123+
124+ The command is logged at INFO. When Dagster selected a subset of assets, the selection is logged
125+ as a count at INFO, with the selector file path when SQLBuild read the selection from one; the
126+ full list of selectors is logged at DEBUG. Each check that did not pass is logged at ERROR, or at
127+ WARNING for a warn-severity check, with its failing row count when the check reports one, so it
128+ shows in the default run log view.
129+
130+ ### Failure output
131+
132+ The ` Failure ` that ` get_error() ` returns, and that ` wait() ` and ` stream() ` raise, starts its
133+ description with what failed: up to 10 failed checks and assets, each with its name, model and
134+ failing row count (or status), followed by "and N more" when there are more. The command and its
135+ exit code follow, then the details of each failed asset.
136+
137+ ```
138+ Failed: 1 check
139+ audit not_null on orders.order_id: 2 failing rows
140+
141+ SQLBuild CLI command failed with exit code 1: sqb audit --json-output ...
142+ ```
143+
144+ Checks that only warned are not listed; they do not fail the command. The failure metadata holds:
145+
146+ | Key | Description |
147+ | -----| -------------|
148+ | ` command ` | The command that ran |
149+ | ` project_dir ` | The project directory |
150+ | ` selection_count ` | How many selectors Dagster passed to SQLBuild |
151+ | ` selector_file ` | The selector file the selection was passed in, or empty |
152+ | ` execution_status ` | The status of the execution JSON |
153+ | ` incomplete_assets ` | Assets that did not complete, as ` kind:name (status) ` |
154+ | ` failed_checks ` | Up to 100 failed checks, each with ` kind ` , ` name ` , ` asset ` , ` column ` , ` status ` and ` failing_rows ` |
155+ | ` failed_check_count ` | How many checks failed |
156+ | ` microbatch_limits ` | Microbatch limit evidence of incomplete assets, when there is any |
157+
158+ The metadata no longer lists the selection itself: ` selection ` was replaced by ` selection_count `
159+ and ` selector_file ` . Without an execution JSON, the metadata holds the non-empty ` stdout_tail ` and
160+ ` stderr_tail ` instead of the execution keys.
161+
122162## sqlbuild_assets
123163
124164Decorator that creates a Dagster multi-asset definition from a SQLBuild DAG artifact.
0 commit comments