Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug report: raise error on dbt source yaml tests field #2538

Open
lei0zhou opened this issue Apr 30, 2024 · 3 comments
Open

bug report: raise error on dbt source yaml tests field #2538

lei0zhou opened this issue Apr 30, 2024 · 3 comments
Labels
Bug Something isn't working Project: dbt Work related to supporting dbt interface

Comments

@lei0zhou
Copy link

based on the following dbt source yaml setup, sqlmesh will raise error with Could not render or parse jinja at '/Users/leizhou/Dev/dbt_park/models/raw-sparcs/_sources.yml'. Encountered unknown tag 'test'.

---
version: 2
sources:
  - name: a
    database: abc
    schema: c
    tables:
      - name: b
        tests:
          - dbt_expectations.expect_table_columns_to_contain_set:
              column_list: ['id']
@izeigerman
Copy link
Member

Can you please attache a full stacktrace.

@lei0zhou
Copy link
Author

thanks! not sure exactly the thing you need. I am attaching the command line output and log file. let me know if you need anything else.

sqlmesh plan
16:45:29  Registered adapter: duckdb=1.7.4
16:45:29  Unable to do partial parsing because a project dependency has been added
Error: Could not render or parse jinja at '/Users/leizhou/Dev/sqlmesh_park/models/example/schema.yml'.
Encountered unknown tag 'test'.
2024-04-30 12:45:29,712 - MainThread - sqlmesh.core.config.connection - INFO - Creating new DuckDB adapter for data files: {'dev.duckdb'} (connection.py:255)
2024-04-30 12:45:29,730 - MainThread - sqlmesh.core.config.connection - INFO - Creating new DuckDB adapter for in-memory database (connection.py:257)
2024-04-30 12:45:30,741 - MainThread - sqlmesh.core.config.connection - INFO - Using existing DuckDB adapter due to overlapping data file: dev.duckdb (connection.py:250)

@eakmanrq eakmanrq added Bug Something isn't working Project: dbt Work related to supporting dbt interface labels May 6, 2024
@izeigerman
Copy link
Member

@lei0zhou there should be a file in the logs/ folder which should contain a full backtrace with references to code which caused the exception. If it's not there, can you please try running sqlmesh with the --debug flag to get more details, like:

sqlmesh --debug <command> ...

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Project: dbt Work related to supporting dbt interface
Projects
None yet
Development

No branches or pull requests

3 participants