Snowflake-Labs / sfquickstarts

Follow along with our tutorials to get you up and running with the Snowflake Data Cloud.
Apache License 2.0
297 stars 562 forks source link

Missing "name" field in dbt_project.yml causing runtime error in Airflow tutorial #1377

Open tyukei opened 2 weeks ago

tyukei commented 2 weeks ago

Describe the bug Following the tutorial on Snowflake's Quickstarts for data engineering with Apache Airflow, the final step requires installing the dbt module from the db_utils directory by running dbt deps. However, executing this command results in a runtime error stating that the required "name" field is not present in the project.

URL of where you see the bug https://github.com/Snowflake-Labs/sfquickstarts/blob/master/site/sfguides/src/data_engineering_with_apache_airflow_ja/data_engineering_with_apache_airflow_ja.md

To Reproduce Steps to reproduce the behavior:

  1. Go to https://quickstarts.snowflake.com/guide/data_engineering_with_apache_airflow_ja/index.html?index=..%2F..index#2
  2. Follow the steps in the tutorial until the final step.

    最後のステップは、db_utilsのdbtモジュールをインストールすることです。dbtディレクトリから次を実行します。

  3. In the dbt directory, run dbt deps.
  4. See error in the console output.

Expected behavior I expected the dbt deps command to execute successfully, installing the required dependencies without any runtime errors.

Desktop (please complete the following information):

Additional context Console output:

dbt deps
00:34:17  Running with dbt=1.7.14
00:34:17  Encountered an error:
Runtime Error
  Required "name" field not present in project

Original dbt_project.yml:

models:
  my_new_project:
      # Applies to all files under models/example/
      transform:
          schema: transform
          materialized: view
      analysis:
          schema: analysis
          materialized: view

Fix In my case, I was able to resolve the issue by adding the following configuration to the dbt_project.yml file:

name: example
profile: default
models:
  my_new_project:
      # Applies to all files under models/example/
      transform:
          schema: transform
          materialized: view
      analysis:
          schema: analysis
          materialized: view
seed-paths: ["data"]

Incorporating this change might help others encountering the same problem.  Thanks!