Skip to content

Commit 749578d

Browse files
committed
setting up pipeline
1 parent dbfd4bb commit 749578d

File tree

7 files changed

+66
-136
lines changed

7 files changed

+66
-136
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Pipeline
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build-image:
12+
name: Build the DBT Image
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Build and push Docker image
18+
uses: docker/build-push-action@v6
19+
with:
20+
push: ${{ github.event_name != 'pull_request' }}
21+
22+
deploy-cloudformation:
23+
name: Deploy CloudFormation Stack
24+
runs-on: ubuntu-latest
25+
needs: build-image
26+
steps:
27+
- uses: actions/checkout@v3
28+
29+
- uses: aws-actions/setup-sam@v2
30+
with:
31+
use-installer: true
32+
33+
- name: Configure AWS Credentials
34+
uses: aws-actions/configure-aws-credentials@v2
35+
with:
36+
aws-region: us-east-1
37+
role-to-assume: 'arn:aws:iam::144406111952:role/Deployer'
38+
role-session-name: Deploy
39+
40+
- name: Deploy stack
41+
run: sam deploy

.github/workflows/validate_on_platforms.yml

Lines changed: 0 additions & 128 deletions
This file was deleted.

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
FROM ghcr.io/dbt-labs/dbt-core:1.9.latest
22

3+
ENV PGPASSWORD ''
4+
ENV PGUSER postgres
5+
ENV PGHOST localhost
6+
ENV DATA_S3_PATH ''
7+
38
WORKDIR /app
49

510
COPY requirements.txt ./
611
RUN pip3 install --upgrade pip
712
RUN pip3 install --requirement requirements.txt
813

14+
COPY . ./

dbt_project.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,22 @@ clean-targets:
1919

2020
require-dbt-version: [">=1.0.0", "<2.0.0"]
2121

22-
seeds:
23-
+docs:
24-
node_color: '#cd7f32'
25-
2622
models:
2723
jaffle_shop:
2824
+materialized: table
2925
staging:
3026
+materialized: view
27+
+database: memory
3128
+docs:
3229
node_color: 'silver'
3330
+docs:
3431
node_color: 'gold'
32+
33+
on-run-start:
34+
# - |
35+
# CREATE OR REPLACE SECRET secret (
36+
# TYPE s3,
37+
# PROVIDER credential_chain
38+
# );
39+
- ATTACH 'ducklake:postgres:host={{ env_var('PGHOST') }}' AS ducklake (DATA_PATH '{{ env_var('DATA_S3_PATH' )}}');
40+
- USE ducklake;

models/schema.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ version: 2
33
models:
44
- name: checkbook
55
description: State of Iowa checkbook
6-
76
columns:
87
- name: rec_no
98
- name: fiscal_year

profiles.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ jaffle_shop:
44
outputs:
55
dev:
66
type: duckdb
7-
path: 'jaffle_shop.duckdb'
8-
threads: 24
97
extensions:
8+
- aws
9+
- https
1010
- httpfs
11+
- ducklake
1112
- parquet
13+
- postgres
14+
secrets:
15+
- type: s3
16+
provider: credential_chain
17+
region: "us-east-1"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ diff-cover==8.0.3
7070
# via sqlfluff
7171
duckcli==0.2.1
7272
# via -r requirements.in
73-
duckdb==1.2.0
73+
duckdb==1.3.0
7474
# via
7575
# dbt-duckdb
7676
# duckcli

0 commit comments

Comments
 (0)