Skip to content

[Bug] Could not parse schedule from description: TRIGGER ON UPDATE #1293

@phawitwo-sd

Description

@phawitwo-sd

Describe the bug

The dbt-databricks adapter fails to parse the Databricks-native TRIGGER ON UPDATE schedule clause for Materialized Views and Streaming Tables. While this is a valid Databricks SQL syntax for event-driven refreshes, the adapter currently throws a parsing error, likely because it only expects time-based or cron schedules.

Steps To Reproduce

  1. Define a Materialized View or Streaming Table in dbt.
  2. In the model's configuration (either in .sql or dbt_project.yml), include a schedule description set to TRIGGER ON UPDATE
  3. Run dbt parse or dbt run

Expected behavior

The adapter should successfully parse the TRIGGER ON UPDATE description and include it in the generated DDL for Databricks without raising a Could not parse schedule error.

Screenshots and log output

`dbt run -s models/00_staging_layer/th_sdt_payment/stg_th_sdt_payment__transfer_feedback.sql
08:37:56 Running with dbt=1.10.13
/Users/phawit-sunday/anaconda3/envs/de-py3.11/lib/python3.11/site-packages/pydantic/_internal/_config.py:373: UserWarning: Valid config keys have changed in V2:

  • 'allow_population_by_field_name' has been renamed to 'validate_by_name'
    warnings.warn(message, UserWarning)
    08:37:57 Registered adapter: databricks=1.10.4
    08:38:01 Found 749 models, 2 seeds, 3 operations, 3526 data tests, 906 sources, 87 exposures, 1957 macros
    08:38:01
    08:38:01 Concurrency: 8 threads (target='dev_prod')
    08:38:01
    08:38:36 1 of 2 START hook: sunday_data_warehouse.on-run-start.0 ........................ [RUN]
    08:38:36 1 of 2 OK hook: sunday_data_warehouse.on-run-start.0 ........................... [OK in 22.39s]
    08:38:36 Elementary: Runtime data: {"config": {"disable_run_results": "True", "disable_tests_results": "True", "disable_dbt_artifacts_autoupload": "True", "disable_dbt_invocation_autoupload": "True"}, "dbt_version": "1.10.13", "elementary_version": "0.19.4", "database": "th_dev", "schema": "dev_nine_2026_mat_view_elementary"}
    08:38:36 2 of 2 START hook: elementary.on-run-start.1 ................................... [RUN]
    08:38:36 2 of 2 OK hook: elementary.on-run-start.1 ...................................... [OK in 0.06s]
    08:38:36
    08:38:36 1 of 1 START sql materialized_view model dev_nine_2026_mat_view_stg_sdt_payment.transfer_feedback [RUN]
    08:38:37 1 of 1 ERROR creating sql materialized_view model dev_nine_2026_mat_view_stg_sdt_payment.transfer_feedback [ERROR in 1.74s]
    08:38:37
    08:38:38 1 of 1 START hook: elementary.on-run-end.0 ..................................... [RUN]
    08:38:38 1 of 1 OK hook: elementary.on-run-end.0 ........................................ [OK in 0.03s]
    08:38:38
    08:38:38 Finished running 1 materialized view model, 3 project hooks in 0 hours 0 minutes and 37.62 seconds (37.62s).
    08:38:40
    08:38:40 Completed with 1 error, 0 partial successes, and 0 warnings:
    08:38:40
    08:38:40 Failure in model stg_th_sdt_payment__transfer_feedback (models/00_staging_layer/th_sdt_payment/stg_th_sdt_payment__transfer_feedback.sql)
    08:38:40 Runtime Error in model stg_th_sdt_payment__transfer_feedback (models/00_staging_layer/th_sdt_payment/stg_th_sdt_payment__transfer_feedback.sql)
    Could not parse schedule from description: TRIGGER ON UPDATE. This is most likely a bug in the dbt-databricks adapter, so please file an issue!
    08:38:40
    08:38:40 compiled code at target/compiled/sunday_data_warehouse/models/00_staging_layer/th_sdt_payment/stg_th_sdt_payment__transfer_feedback.sql
    08:38:40
    08:38:40 Done. PASS=3 WARN=0 ERROR=1 SKIP=0 NO-OP=0 TOTAL=4`

System information

The output of dbt --version:

Core:
  - installed: 1.10.13
  - latest:    1.11.2  - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - databricks: 1.10.4 - Update available!
  - spark:      1.9.3  - Update available!

The operating system you're using:
macos
The output of python --version:
Python 3.11.9

Additional context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions