You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,9 @@ The way we differentiate jobs defined from code from the ones defined from the U
13
13
14
14
⚠️ Important: If you plan to use this tool but have existing jobs ending with `[[...]]` you should rename them before running any command.
15
15
16
+
> [!NOTE]
17
+
> If keeping job names clean in the dbt Cloud UI is a requirement, the `--use-desc-for-id` flag (or `DBT_JOBS_AS_CODE_USE_DESC_FOR_ID=True` env var) moves the `[[<identifier>]]` tag from the job name to the job description instead. This is an advanced option intended for specific cases — the default name-based approach is recommended for most users.
18
+
16
19
Below is a demonstration of how to use dbt-jobs-as-code as part of CI/CD, leveraging the new templating features.
@@ -25,7 +28,7 @@ Terraform is much more powerful but using it requires some knowledge about the t
25
28
26
29
With this package's approach, people don't need to learn another tool and can configure dbt Cloud using YAML, a language used across the dbt ecosystem:
27
30
28
-
-**no state file required**: the link between the YAML jobs and the dbt Cloud jobs is stored in the jobs name, in the `[[<identifier>]]` part
31
+
-**no state file required**: the link between the YAML jobs and the dbt Cloud jobs is stored in the jobs name, in the `[[<identifier>]]` part (or in the job description when using `--use-desc-for-id`)
29
32
-**YAML**: dbt users are familiar with YAML and we created a JSON schema allowing people to verify that their YAML files are correct
30
33
- by using filters like `--project-id`, `--environment-id` or `--limit-projects-envs-to-yml` people can limit the projects and environments checked by the tool, which can be used to "promote" jobs between different dbt Cloud environments
31
34
@@ -127,11 +130,13 @@ To do so, the program looks at the YAML file for the config `linked_id`.
127
130
128
131
Accepts a `--dry-run` flag to see what jobs would be changed, without actually changing them.
129
132
133
+
When using `--use-desc-for-id`, the `[[ ... ]]` tag is stored in the job description instead of the job name.
134
+
130
135
#### `unlink`
131
136
132
137
Command: `dbt-jobs-as-code unlink --config <config_file_or_pattern.yml>` or `dbt-jobs-as-code unlink --account-id <account-id>`
133
138
134
-
Unlinking jobs removes the `[[ ... ]]` part of the job name in dbt Cloud.
139
+
Unlinking jobs removes the `[[ ... ]]` part of the job name (or description, when using `--use-desc-for-id`) in dbt Cloud.
135
140
136
141
⚠️ This can't be rolled back by the tool. Doing a `unlink` followed by a `sync` will create new instances of the jobs, with the `[[<identifier>]]` part
137
142
@@ -186,15 +191,15 @@ The tool will raise errors if:
Copy file name to clipboardExpand all lines: docs/advanced_config/jobs_importing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ To do, so the identifier of the job should be in the format `[[envs_filter:ident
112
112
- the jobs with an `envs_filter` that is empty are imported
113
113
- the jobs with an `envs_filter` equal to `*` are imported
114
114
115
-
As an example, if a job is named `My daily job [[uat:my-daily-job]]` :
115
+
As an example, if a job is named `My daily job [[uat:my-daily-job]]` (or has `[[uat:my-daily-job]]` in its description when using `--use-desc-for-id`) :
116
116
117
117
- `dbt-jobs-as-code import-jobs ... --filter uat`will import the job ✅
118
118
- `dbt-jobs-as-code import-jobs ...`without a filter will import the job ✅
Copy file name to clipboardExpand all lines: docs/changelog.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,15 @@
1
1
2
2
To see the details of all changes, head to the GitHub repo
3
3
4
+
### 1.18
5
+
6
+
- Add `--use-desc-for-id` flag (env var: `DBT_JOBS_AS_CODE_USE_DESC_FOR_ID`) to store the `[[<identifier>]]` tag in the job description instead of the job name. This is useful when keeping job names clean in the dbt Cloud UI is a requirement. Supported by all commands: `plan`, `sync`, `validate`, `import-jobs`, `link`, `unlink`, `deactivate-jobs`.
7
+
8
+
### 1.17
9
+
10
+
- Validate that job descriptions don't exceed the 255 character limit before sending to the API.
11
+
- Drop Python 3.9 support (EOL) and update dependencies.
12
+
4
13
### 1.16
5
14
6
15
- Add support for `cost_optimization_features` in job definitions. Valid values are `state_aware_orchestration` and `efficient_testing`. This allows for dbt users on the Fusion engine to configure cost optimization natively in their YAML job definitions.
Copy file name to clipboardExpand all lines: docs/getting_started.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ The following environment variables are used to run the code:
39
39
40
40
-`DBT_API_KEY`: [Mandatory] The dbt Cloud API key to interact with dbt Cloud. Can be a Service Token (preferred, would require the "job admin" scope) or the API token of a given user
41
41
-`DBT_BASE_URL`: [Optional] By default, the tool queries `https://cloud.getdbt.com`, if your dbt Cloud instance is hosted on another domain, define it in this env variable (e.g. `https://emea.dbt.com`)
42
+
-`DBT_JOBS_AS_CODE_USE_DESC_FOR_ID`: [Optional] When set to `True`, stores the `[[<identifier>]]` tag in the job description instead of the job name. See `--use-desc-for-id` for details.
0 commit comments