Skip to content

Commit 5be6edb

Browse files
committed
Bump version and update docs
1 parent 566df49 commit 5be6edb

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,21 @@ Queries dbt Cloud and provide the YAML definition for those jobs. It includes th
9292

9393
- it is possible to restrict the list of dbt Cloud Job IDs by adding `... -j 101 -j 123 -j 234`
9494
- this command also accepts a list of project IDs or environments IDs to limit the command for: `dbt-jobs-as-code sync <config_file.yml> -p 1234 -p 2345 -e 4567 -e 5678`
95+
- this command accepts a `--include-linked-id` parameter to allow linking the jobs in the YAML to existing jobs in dbt Cloud, by renaming those
9596
- once the YAML has been retrieved, it is possible to copy/paste it in a local YAML file to create/update the local jobs definition.
9697

97-
To move some ui-jobs to jobs-as-code, perform the following steps:
98+
Once the configuration is imported, it is possible to "link" existing jobs by using the `link` command explained below.
9899

99-
- run the command to import the jobs
100-
- copy paste the job/jobs into a YAML file
101-
- change the `import_` id of the job in the YAML file to another unique identifier
102-
- rename the job in the UI to end with `[[new_job_identifier]]`
103-
- run a `plan` command to verify that no changes are required for the given job
100+
#### `link`
101+
102+
Command: `dbt-jobs-as-code link <config_file.yml>`
103+
104+
Links dbt Cloud jobs with the corresponding identifier from the YAML file by renaming the jobs, adding the `[[ ... ]]` part in the job name.
105+
106+
To do so, the program looks at the YAML file for the config `linked_id`.
107+
`linked_id` can be added manually or can be added automatically when calling `dbt-jobs-as-code import-jobs` with the `--include-linked-id` parameter.
108+
109+
Accepts a `--dry-run` flag to see what jobs would be changed, without actually changing them.
104110

105111
#### `unlink`
106112

@@ -161,14 +167,15 @@ The tool will raise errors if:
161167

162168
### Summary of parameters
163169

164-
| Command | `--project-id` / `-p` | `--environment-id` / `-e` | `--limit-projects-envs-to-yml` / `-l` | `--vars-yml` / `-v` | `--online` | `--job-id` / `-j` | `--identifier` / `-i` | `--dry-run` |
165-
| --------------- | :-------------------: | :-----------------------: | :-----------------------------------: | :-----------------: | :--------: | :---------------: | :-------------------: | :---------: |
166-
| plan | ✅ | ✅ | ✅ | ✅ | | | | |
167-
| sync | ✅ | ✅ | ✅ | ✅ | | | | |
168-
| validate | | | | ✅ | ✅ | | | |
169-
| import-jobs | ✅ | ✅ | | | | ✅ | | |
170-
| unlink | | | | | | | ✅ | ✅ |
171-
| deactivate-jobs | | | | | | ✅ | | |
170+
| Command | `--project-id` / `-p` | `--environment-id` / `-e` | `--limit-projects-envs-to-yml` / `-l` | `--vars-yml` / `-v` | `--online` | `--job-id` / `-j` | `--identifier` / `-i` | `--dry-run` | `--include-linked-id` |
171+
| --------------- | :-------------------: | :-----------------------: | :-----------------------------------: | :-----------------: | :--------: | :---------------: | :-------------------: | :---------: | :-------------------: |
172+
| plan | ✅ | ✅ | ✅ | ✅ | | | | | |
173+
| sync | ✅ | ✅ | ✅ | ✅ | | | | | |
174+
| validate | | | | ✅ | ✅ | | | | |
175+
| import-jobs | ✅ | ✅ | | | | ✅ | | | ✅ |
176+
| link | | | | | | | | ✅ | |
177+
| unlink | | | | | | | ✅ | ✅ | |
178+
| deactivate-jobs | | | | | | ✅ | | | |
172179

173180
As a reminder using `--project-id` and/or `--environment-id` is not compatible with using `--limit-projects-envs-to-yml`.
174181
We can only restricts by providing the IDs or by forcing to restrict on the environments and projects in the YML file.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies = [
2020
"importlib-metadata<7,>=6.0",
2121
]
2222
name = "dbt-jobs-as-code"
23-
version = "0.10.0"
23+
version = "0.11.0"
2424
description = "A CLI to allow defining dbt Cloud jobs as code"
2525
readme = "README.md"
2626
keywords = [

0 commit comments

Comments
 (0)