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
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,15 +92,21 @@ Queries dbt Cloud and provide the YAML definition for those jobs. It includes th
92
92
93
93
- it is possible to restrict the list of dbt Cloud Job IDs by adding `... -j 101 -j 123 -j 234`
94
94
- 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
95
96
- 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.
96
97
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.
98
99
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.
104
110
105
111
#### `unlink`
106
112
@@ -161,14 +167,15 @@ The tool will raise errors if:
0 commit comments