Skip to content

Commit 9e2efd6

Browse files
author
Radosław Dziadosz
committed
Add dbt-cloud integration command to dp cli
# Documentation
1 parent 6d9ceae commit 9e2efd6

File tree

3 files changed

+78
-2
lines changed

3 files changed

+78
-2
lines changed

data_pipelines_cli/cli_commands/dbtcloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def read_bigquery_config(env: str) -> Dict[str, Any]:
3838
"--account_id",
3939
type=int,
4040
required=True,
41-
help="""dbt Cloud Account identifier To obtain your dbt Cloud account ID, sign into dbt Cloud
41+
help="""dbt Cloud Account identifier To obtain your dbt Cloud account ID, sign into dbt Cloud
4242
in your browser. Take note of the number directly following the accounts path component of the
4343
URL - this is your account ID""",
4444
)

docs/configuration.rst

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,70 @@ Example ``looker.yml`` file might look like this:
375375
looker_project_id: my_looker_project
376376
looker_webhook_secret: "{{ env_var('LOOKER_WEBHOOK_SECRET') }}"
377377
looker_repository_branch: main
378-
looker_instance_url: https://looker.company.com/
378+
looker_instance_url: https://looker.company.com/
379+
380+
dbt Cloud configuration
381+
++++++++++++++++++++++++++++++
382+
383+
``config/dbtcloud.yml`` contains configuration related to dbt Cloud:
384+
385+
.. list-table::
386+
:widths: 25 20 55
387+
:header-rows: 1
388+
389+
* - Parameter
390+
- Data type
391+
- Description
392+
* - project_name
393+
- string
394+
- Name of the project to be created in dbt Cloud
395+
* - schedule_interval
396+
- string
397+
- The cron expression with which the example job will be run
398+
* - default_gcp_project
399+
- string
400+
- GCP project that will be used by default if a new environment is created in dbt Cloud
401+
* - environments
402+
- Array
403+
- Details of the environments to be created in dbt Cloud
404+
405+
Configuration of the environments:
406+
407+
.. list-table::
408+
:widths: 25 20 55
409+
:header-rows: 1
410+
411+
* - Parameter
412+
- Data type
413+
- Description
414+
* - name
415+
- string
416+
- Name of the environment that will be created in dbt Cloud
417+
* - dataset
418+
- string
419+
- Target dataset for this environment
420+
* - dbt_version
421+
- string
422+
- The dbt version used in this environment
423+
* - bq_config_dir
424+
- string
425+
- The name of the dp env directory where the bigquery configuration for the environment is located. The name of the project in GCP will be read from it.
426+
427+
Example ``dbtcloud.yml`` file might look like this:
428+
429+
.. code-block:: yaml
430+
431+
project_name: "Data Pipelines Project"
432+
schedule_interval: "0 12 * * *"
433+
default_gcp_project: "default-project"
434+
environments:
435+
- name: "Develop"
436+
dataset: "dev"
437+
dbt_version: "1.0.0"
438+
type: "development"
439+
bq_config_dir: "dev"
440+
- name: "Production"
441+
dataset: "prod"
442+
dbt_version: "1.0.0"
443+
type: "deployment"
444+
bq_config_dir: "prod"

docs/integration.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,13 @@ Looker
7171

7272
**dp** can generate lookML codes for your models and views, publish and deploy your `Looker <https://www.looker.com/>`_ project
7373

74+
dbt Cloud
75+
++++++++++++++++++++++++++++++++++++++++++++++
76+
77+
The `Data Pipelines CLI` can configure a project in dbt Cloud. The following functions are supported:
78+
79+
- creation of a project
80+
- adding a repository
81+
- adding a connection to BigQuery
82+
- creation of environments
83+
- creation of sample jobs

0 commit comments

Comments
 (0)