From 44144220ed16f69767ea35d24b940b07af6964b0 Mon Sep 17 00:00:00 2001 From: Fernando Mercado Date: Wed, 26 Aug 2026 09:02:00 -0500 Subject: [PATCH 1/2] Document required Schema field for @task.datacoves_dbt service connections Users leaving Schema empty on a Datacoves service connection hit a dbt profile validation error ("None is not of type 'string'") that names their own dbt profile, leading them to wrongly suspect the repo's profiles.yml is being used instead of the generated temporary profile. Clarify that Schema is required for @task.datacoves_dbt, and that the Airflow Snowflake provider's "optional" schema applies to the Airflow connection only, not the generated dbt profile. --- docs/how-tos/datacoves/how_to_service_connections.md | 2 +- docs/reference/airflow/datacoves-decorators.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/how-tos/datacoves/how_to_service_connections.md b/docs/how-tos/datacoves/how_to_service_connections.md index b0b5d1a..2a62e5a 100644 --- a/docs/how-tos/datacoves/how_to_service_connections.md +++ b/docs/how-tos/datacoves/how_to_service_connections.md @@ -26,7 +26,7 @@ A Service Connection consists of the following fields: - **Environment Variables** The legacy method Datacoves used which would inject the connection credentials as environment variables into Airflow. The name of the service connection will be used to dynamically create [environment variables](/docs/reference/airflow/environment-service-connection-vars) which we inject into Airflow. ![Delivery Mode](assets/service_connection_delivery.jpg). - **Connection Template** The connection template to base this service connection on(i.e. the defaults) - Depending on the template selected, additional fields will be displayed with the default values entered in the connection template. These default values can be overridden by toggling the indicator next to the given value. Enter the appropriate user, schema, and password. This is commonly a service account created specifically for Airflow and may differ between the development and production environment. + Depending on the template selected, additional fields will be displayed with the default values entered in the connection template. These default values can be overridden by toggling the indicator next to the given value. Enter the appropriate user, schema, and password. This is commonly a service account created specifically for Airflow and may differ between the development and production environment. **Schema is required** if the connection will be used with [`@task.datacoves_dbt`](/docs/reference/airflow/datacoves-decorators#taskdatacoves_dbt); leaving it empty causes a dbt profile validation error at runtime. ![Service Connection Connection Details](./assets/serviceconnection_editnew_details.png) diff --git a/docs/reference/airflow/datacoves-decorators.md b/docs/reference/airflow/datacoves-decorators.md index 8dbc000..7f8b04f 100644 --- a/docs/reference/airflow/datacoves-decorators.md +++ b/docs/reference/airflow/datacoves-decorators.md @@ -60,6 +60,16 @@ Datacoves dbt decorator supports all the [Datacoves dbt Operator params](/docs/r With the `connection_id` mentioned above, we create a temporary dbt profile (it only exists at runtime inside the Airflow DAG's worker). By default, this dbt profile contains the selected Service Credential connection details. +:::warning +The service connection's **Schema** field must be populated when the connection will be used with `@task.datacoves_dbt`. Leaving it empty causes an error like: + +``` +Credentials in profile "my_dw_profile", target "dev" invalid: None is not of type 'string' +``` + +The Airflow Snowflake provider docs list `schema` as optional. That applies to the Airflow connection, not to the dbt profile generated from it, which requires `schema`. +::: + The dbt profile `name` is defined either in Project or Environment settings, in their `Profile name` field. This can be overwritten by passing a custom `DATACOVES__DBT_PROFILE` environment variable to the decorator. Users can also customize this dbt profile's connection details and/or target with the following params: From 972902990d0d58ac030d5a0c199fad81a5b206fe Mon Sep 17 00:00:00 2001 From: Fernando Mercado Date: Wed, 26 Aug 2026 09:28:22 -0500 Subject: [PATCH 2/2] Restructure dbt profile generation section into defaults/overrides table Makes the existing defaults (connection details, profile name, target name) and their overrides explicit and scannable instead of prose, per request to clarify what @task.datacoves_dbt does out of the box vs. what can be customized. --- .../reference/airflow/datacoves-decorators.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/reference/airflow/datacoves-decorators.md b/docs/reference/airflow/datacoves-decorators.md index 7f8b04f..2c97d3e 100644 --- a/docs/reference/airflow/datacoves-decorators.md +++ b/docs/reference/airflow/datacoves-decorators.md @@ -58,7 +58,13 @@ Datacoves dbt decorator supports all the [Datacoves dbt Operator params](/docs/r **dbt profile generation:** -With the `connection_id` mentioned above, we create a temporary dbt profile (it only exists at runtime inside the Airflow DAG's worker). By default, this dbt profile contains the selected Service Credential connection details. +With the `connection_id` mentioned above, we create a temporary dbt profile (it only exists at runtime inside the Airflow DAG's worker). + +By default: + +- **Connection details** (user, password, warehouse, database, schema, role, etc.) come from the selected service connection (`connection_id`). +- **Profile name** comes from the **Profile name** field in Project or Environment settings. +- **Target name** is `default`. :::warning The service connection's **Schema** field must be populated when the connection will be used with `@task.datacoves_dbt`. Leaving it empty causes an error like: @@ -70,12 +76,13 @@ Credentials in profile "my_dw_profile", target "dev" invalid: None is not of typ The Airflow Snowflake provider docs list `schema` as optional. That applies to the Airflow connection, not to the dbt profile generated from it, which requires `schema`. ::: -The dbt profile `name` is defined either in Project or Environment settings, in their `Profile name` field. This can be overwritten by passing a custom `DATACOVES__DBT_PROFILE` environment variable to the decorator. - -Users can also customize this dbt profile's connection details and/or target with the following params: +These can be overridden with the following params: -- `overrides`: a dictionary with override parameters such as warehouse, role, database, etc. -- `target`: the target name this temporary dbt profile will receive. Defaults to `default`. +| What | How | +|---|---| +| Profile name | Pass a custom `DATACOVES__DBT_PROFILE` environment variable, e.g. `env={"DATACOVES__DBT_PROFILE": "prod"}` | +| Target name | `target`: the target name this temporary dbt profile will receive | +| Connection details | `overrides`: a dictionary with override parameters such as warehouse, role, database, etc. | Basic example: