简体   繁体   中英

dbt- synapse models\example generating error

The problem I'm having is after the profiles.yml All checks passed! (the connection successful) when i run dbt get this message

Configuration paths exist in your dbt_project.yml file which do not apply to any resources. There are 1 unused configuration paths:- models.dbt_project.example

when I run

dbt --version
Core:  - installed: 1.4.1
  - latest:    1.4.1 - Up to date!
Plugins:  - sqlserver: 1.3.0 - Not compatible!
  - synapse:   1.3.2 - Not compatible!
  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

The error message is telling you what is wrong. There is config in your dbt_project.yml file that does not apply to any files in your models directory.

When you run dbt init , it creates some example models (.sql files) in the models/example directory, like my_first_dbt_model.sql . It also adds some example config to dbt_project.yml that looks like this:

# towards the bottom...
models:
  your_project_name:
    # Config indicated by + and applies to all files under models/example/
    example:
      +materialized: view

You need to delete the example key, since you deleted that directory. You could also delete the keys above it, or keep them, since you'll probably add config at some point.

The OTHER error is probably because you installed dbt-core separately from dbt-synapse . You should delete your virtual environment and start over by just running pip install dbt-synapse , which will automatically install a compatible version of dbt-core . You should NEVER pin versions of dbt-core , only the version of your adapter (since the adapter will specify its compatible versions of dbt-core ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM