Skip to content

v1.11.14

Choose a tag to compare

@github-actions github-actions released this 11 Apr 14:48
· 9 commits to master since this release

Bug fixes

  • Fixed dbt show -s <python_model> crashing with
    AttributeError: 'NoneType' object has no attribute 'print_table' (#6).
    Root cause: dbt's default get_limit_sql wraps compiled_code in
    LIMIT N and executes it, but Python models have Python source as
    compiled_code so the wrapped string fails to parse as SQL
    (Parser Error: syntax error at or near "def"). The runner catches that
    error but still stores agate_table=None, and task_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_sql to detect Python models via model.language
    and select * from {{ this }} limit N from the already-materialized
    target relation instead.

Test suite

  • New TestShowPythonModelGizmoSQL regression test covering standalone
    Python model, Python model calling dbt.ref(), a plain SQL model (guard
    against breaking the default path), and Python model + --limit.

Full Changelog: v1.11.13...v1.11.14