-
Notifications
You must be signed in to change notification settings - Fork 2
/
dbt-snowflake.yaml
60 lines (55 loc) · 1.9 KB
/
dbt-snowflake.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
id: dbt-snowflake
namespace: company.team
tasks:
- id: git
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone_repository
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/dbt-example
branch: main
- id: dbt
type: io.kestra.plugin.dbt.cli.DbtCLI
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
containerImage: ghcr.io/kestra-io/dbt-snowflake:latest
profiles: |
my_dbt_project:
outputs:
dev:
type: snowflake
account: "{{ secret('SNOWFLAKE_ACCOUNT') }}"
user: "{{ secret('SNOWFLAKE_USER') }}"
password: "{{ secret('SNOWFLAKE_PASSWORD') }}"
role: "{{ secret('SNOWFLAKE_ROLE') }}"
database: "{{ secret('SNOWFLAKE_DATABASE') }}"
warehouse: COMPUTE_WH
schema: public
threads: 4
query_tag: dbt
client_session_keep_alive: False
connect_timeout: 10
target: dev
commands:
- dbt deps
- dbt build
extend:
title: Git workflow for dbt with Snowflake
description: >-
This flow:
- clones a dbt Git repository from GitHub
- pulls a public container image with the required dependencies
- runs dbt CLI commands within a container
This flow assumes that your Snowflake credentials are stored as secrets.
To run a flow from this blueprint, you can simply copy-paste the contents of
your `~/.dbt/profiles.yml` into the `profiles` section and you're good to
go!
tags:
- Git
- dbt
- Snowflake
ee: false
demo: false
meta_description: This flow clones a dbt Git repository from GitHub, pulls a
public container image with the required dependencies, runs dbt CLI commands
within a container.