v1.11.14
Bug fixes
- Fixed
dbt show -s <python_model>crashing with
AttributeError: 'NoneType' object has no attribute 'print_table'(#6).
Root cause: dbt's defaultget_limit_sqlwrapscompiled_codein
LIMIT Nand executes it, but Python models have Python source as
compiled_codeso the wrapped string fails to parse as SQL
(Parser Error: syntax error at or near "def"). The runner catches that
error but still storesagate_table=None, andtask_end_messages
dereferences it without a status check — the NoneType traceback is just
the tombstone on top of the real parse failure. Override
gizmosql__get_limit_sqlto detect Python models viamodel.language
andselect * from {{ this }} limit Nfrom the already-materialized
target relation instead.
Test suite
- New
TestShowPythonModelGizmoSQLregression test covering standalone
Python model, Python model callingdbt.ref(), a plain SQL model (guard
against breaking the default path), and Python model +--limit.
Full Changelog: v1.11.13...v1.11.14