-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update dbt-core to v1.7.3 * add dbt-databricks * update databricks to v1.7.3 and add http_path as a user input update ghcr instructions * updates from Leo (#61) * fix optional parameter INPUT_HTTP_PATH * fix databricks token profiles.yml file * fix INPUT_HTTP_PATH escape slash in sed * check if profiles.yml exist --------- Co-authored-by: Leo Schick <[email protected]> --------- Co-authored-by: Leo Schick <[email protected]>
- Loading branch information
1 parent
a38e25d
commit 551e391
Showing
6 changed files
with
60 additions
and
36 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 |
---|---|---|
|
@@ -16,12 +16,13 @@ FROM --platform=$build_for python:3.10.7-slim-bullseye as base | |
# N.B. The refs updated automagically every release via bumpversion | ||
# N.B. dbt-postgres is currently found in the core codebase so a value of dbt-core@<some_version> is correct | ||
|
||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
ARG [email protected] | ||
# special case args | ||
ARG dbt_spark_version=all | ||
ARG dbt_third_party | ||
|
@@ -106,6 +107,12 @@ RUN apt-get update \ | |
RUN python -m pip install --no-cache-dir "git+https://github.com/dbt-labs/${dbt_spark_ref}#egg=dbt-spark[${dbt_spark_version}]" | ||
|
||
|
||
## | ||
# dbt-databricks | ||
## | ||
FROM base as dbt-databricks | ||
RUN python -m pip install --no-cache-dir "git+https://github.com/databricks/${dbt_databricks_ref}#egg=dbt-databricks" | ||
|
||
## | ||
# dbt-third-party | ||
## | ||
|
@@ -131,5 +138,6 @@ RUN apt-get update \ | |
RUN python -m pip install --no-cache "git+https://github.com/dbt-labs/${dbt_redshift_ref}#egg=dbt-redshift" | ||
RUN python -m pip install --no-cache "git+https://github.com/dbt-labs/${dbt_bigquery_ref}#egg=dbt-bigquery" | ||
RUN python -m pip install --no-cache "git+https://github.com/dbt-labs/${dbt_snowflake_ref}#egg=dbt-snowflake" | ||
RUN python -m pip install --no-cache "git+https://github.com/databricks/${dbt_databricks_ref}#egg=dbt-databricks" | ||
RUN python -m pip install --no-cache "git+https://github.com/dbt-labs/${dbt_spark_ref}#egg=dbt-spark[${dbt_spark_version}]" | ||
RUN python -m pip install --no-cache "git+https://github.com/dbt-labs/${dbt_postgres_ref}#egg=dbt-postgres&subdirectory=plugins/postgres" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
A GitHub Action to run [dbt](https://www.getdbt.com) commands in a Docker container. It uses the official images provided by [Fishtown Analytics](https://hub.docker.com/r/fishtownanalytics/dbt/tags). You can use [dbt commands](https://docs.getdbt.com/reference/dbt-commands) such as `run`, `test` and `debug`. This action captures the dbt console output for use in subsequent steps. | ||
|
||
### dbt version | ||
The current version of dbt is **1.6.3**. Please note that from dbt v1.0.0. you may have to change your dbt project structure compared to v0.x.x. See the [migration](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-1-0-0) docs. | ||
The current version of dbt is **1.7.3**. Please note that from dbt v1.0.0. you may have to change your dbt project structure compared to v0.x.x. See the [migration](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-1-0-0) docs. | ||
|
||
dbt updates their [docker images](https://hub.docker.com/r/fishtownanalytics/dbt/tags?page=1&ordering=last_updated) on a frequent basis and the main branch of this Github Action should be close to the last stable tag. If you need to use an earlier version of dbt, you can call this action with a specific [release](https://github.com/mwhitaker/dbt-action/releases), eg `mwhitaker/[email protected]` or `mwhitaker/[email protected]`. | ||
|
||
|
@@ -113,23 +113,20 @@ default: | |
target: dev | ||
outputs: | ||
dev: | ||
type: spark | ||
method: http | ||
type: databricks | ||
schema: dev_user | ||
host: abc-12345-3cc5.cloud.databricks.com | ||
port: 443 | ||
schema: abc | ||
token: _token_ # this will be substituted during build time | ||
cluster: 1234-56789-abc233 | ||
connect_timeout: 30 | ||
connect_retries: 15 | ||
threads: 5 | ||
http_path: _http_path_ # this will be substituted during build time | ||
``` | ||
Create a secret for `DBT_TOKEN` and reference it in your workflow. | ||
```yml | ||
- name: dbt-action | ||
uses: mwhitaker/dbt-action@master | ||
with: | ||
dbt_command: "dbt run --profiles-dir ." | ||
http_path: "sql/protocol/" | ||
env: | ||
DBT_TOKEN: ${{ secrets.DBT_TOKEN }} | ||
``` | ||
|
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