-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from sdf-labs/ani/additional_snowflake_and_bq_…
…auth_support Add Snowflake Key Pair Auth and BigQuery Credential Support
- Loading branch information
Showing
5 changed files
with
135 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ jobs: | |
uses: ./ # Uses an action in the root directory | ||
id: sdf | ||
with: | ||
command: 'sdf compile --show all' | ||
workspace_dir: 'workspace/tpch_redshift' | ||
command: "sdf compile --show all" | ||
workspace_dir: "workspace/tpch_redshift" | ||
|
||
aws_region: 'us-west-2' | ||
aws_region: "us-west-2" | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
|
@@ -29,61 +29,13 @@ jobs: | |
echo '```' >>$GITHUB_STEP_SUMMARY | ||
echo "${{ steps.sdf.outputs.log }}" >>$GITHUB_STEP_SUMMARY | ||
echo '```' >>$GITHUB_STEP_SUMMARY | ||
# dbt_init_challenge_v1 - uses dbt-action | ||
dbt_init_challenge_v1: | ||
runs-on: ubuntu-latest | ||
name: Snowflake + dbt workspace - run dbt commands using dbt-action | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run DBT commands | ||
uses: mwhitaker/[email protected] | ||
env: | ||
DBT_TARGET: dev | ||
SNOWFLAKE_ACCOUNT_ID: ${{ secrets.SNOWFLAKE_ACCOUNT_ID }} | ||
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
with: | ||
dbt_command: "dbt compile" | ||
dbt_project_folder: "workspace/dbt_init_challenge" | ||
|
||
- name: Run sdf push | ||
uses: ./ # Uses an action in the root directory | ||
id: sdf | ||
env: | ||
CATALOG: dbt_hol_dev | ||
SCHEMA: public | ||
DBT_TARGET: dev | ||
with: | ||
# TODO: FIX compile failed | ||
command: 'sdf push' | ||
workspace_dir: 'workspace/dbt_init_challenge' | ||
access_key: ${{ secrets.ACCESS_KEY }} | ||
secret_key: ${{ secrets.SECRET_KEY }} | ||
|
||
is_dbt: 'true' | ||
snowflake_account_id: ${{ secrets.SNOWFLAKE_ACCOUNT_ID }} | ||
snowflake_username: ${{ secrets.SNOWFLAKE_USERNAME }} | ||
snowflake_password: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
snowflake_role: 'dbt_test_role' | ||
snowflake_warehouse: 'dbt_dev_wh' | ||
# Use the output from the `sdf` step | ||
- name: Display the sdf output | ||
run: | | ||
echo "### SDF Run Logs 🪵" >> $GITHUB_STEP_SUMMARY | ||
echo '```' >>$GITHUB_STEP_SUMMARY | ||
echo "${{ steps.sdf.outputs.log }}" >>$GITHUB_STEP_SUMMARY | ||
echo '```' >>$GITHUB_STEP_SUMMARY | ||
# dbt_init_challenge_v2: rus dbt commands in a container job | ||
dbt_init_challenge_v2: | ||
dbt_init_challenge: | ||
container: | ||
image: ghcr.io/dbt-labs/dbt-snowflake:1.5.latest | ||
image: ghcr.io/dbt-labs/dbt-snowflake:1.8.latest | ||
volumes: | ||
- ${{ github.workspace }}:/repo | ||
|
||
runs-on: ubuntu-latest | ||
name: Snowflake + dbt workspace - run dbt commands in a container job | ||
steps: | ||
|
@@ -107,19 +59,19 @@ jobs: | |
SCHEMA: public | ||
DBT_TARGET: dev | ||
with: | ||
command: 'sdf push' | ||
command: "sdf push" | ||
# relative path to ${{ github.workspace }} which is automatically mounted by GitHub Actions | ||
workspace_dir: workspace/dbt_init_challenge | ||
access_key: ${{ secrets.ACCESS_KEY }} | ||
secret_key: ${{ secrets.SECRET_KEY }} | ||
|
||
is_dbt: 'true' | ||
is_dbt: "true" | ||
snowflake_account_id: ${{ secrets.SNOWFLAKE_ACCOUNT_ID }} | ||
snowflake_username: ${{ secrets.SNOWFLAKE_USERNAME }} | ||
snowflake_password: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
snowflake_role: 'dbt_test_role' | ||
snowflake_warehouse: 'dbt_dev_wh' | ||
snowflake_role: "dbt_test_role" | ||
snowflake_warehouse: "dbt_dev_wh" | ||
|
||
# Use the output from the `sdf` step | ||
- name: Display the sdf output | ||
run: | | ||
|
@@ -130,10 +82,10 @@ jobs: | |
snowflake: | ||
container: | ||
image: ghcr.io/dbt-labs/dbt-snowflake:1.5.latest | ||
image: ghcr.io/dbt-labs/dbt-snowflake:1.8.latest | ||
volumes: | ||
- ${{ github.workspace }}:/repo | ||
|
||
runs-on: ubuntu-latest | ||
name: Snowflake workspace | ||
steps: | ||
|
@@ -145,7 +97,7 @@ jobs: | |
id: sdf | ||
with: | ||
# TODO: FIX compile failed | ||
command: 'sdf push' | ||
command: "sdf push" | ||
# relative path to ${{ github.workspace }} which is automatically mounted by GitHub Actions | ||
workspace_dir: workspace/snowflake | ||
access_key: ${{ secrets.ACCESS_KEY }} | ||
|
@@ -154,13 +106,13 @@ jobs: | |
snowflake_account_id: ${{ secrets.SNOWFLAKE_ACCOUNT_ID }} | ||
snowflake_username: ${{ secrets.SNOWFLAKE_USERNAME }} | ||
snowflake_password: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
snowflake_role: 'dbt_test_role' | ||
snowflake_warehouse: 'dbt_dev_wh' | ||
snowflake_role: "dbt_test_role" | ||
snowflake_warehouse: "dbt_dev_wh" | ||
|
||
# Use the output from the `sdf` step | ||
- name: Display the sdf output | ||
run: | | ||
echo "### SDF Run Logs 🪵" >> $GITHUB_STEP_SUMMARY | ||
echo '```' >>$GITHUB_STEP_SUMMARY | ||
echo "${{ steps.sdf.outputs.log }}" >>$GITHUB_STEP_SUMMARY | ||
echo '```' >>$GITHUB_STEP_SUMMARY | ||
echo '```' >>$GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters