Commit 895af46e authored by Thomas La Piana's avatar Thomas La Piana

Merge branch...

Merge branch '2424-update-the-docker-analyst-workflow-to-take-into-account-the-individualized-dbt-profiles' into 'master'

Resolve "Update the docker analyst workflow to take into account the individualized dbt profiles"

Closes #2424

See merge request !1614
parents be162780 f1c9138e
......@@ -2,8 +2,6 @@
AIRFLOW_IMAGE = analytics_airflow_webserver_1
GIT_BRANCH = $$(git symbolic-ref --short HEAD)
SNOWFLAKE_ANALYTICS_DB = $(shell echo $(GIT_BRANCH)_ANALYTICS | tr a-z A-Z)
SNOWFLAKE_LOAD_DB = $(shell echo $(GIT_BRANCH)_RAW | tr a-z A-Z)
help:
@echo "\n \
......@@ -47,11 +45,11 @@ data-image:
dbt-docs:
@echo "Generating docs and spinning up the a webserver on port 8081..."
@export SNOWFLAKE_TRANSFORM_DATABASE=$(SNOWFLAKE_ANALYTICS_DB) && export SNOWFLAKE_LOAD_DATABASE=$(SNOWFLAKE_LOAD_DB) && docker-compose run dbt_image bash -c "dbt deps && dbt docs generate --profiles-dir profile && dbt docs serve --port 8081"
@docker-compose run dbt_image bash -c "dbt deps && dbt docs generate --profiles-dir profile && dbt docs serve --port 8081"
dbt-image:
@echo "Attaching to dbt-image and mounting repo..."
@export SNOWFLAKE_TRANSFORM_DATABASE=$(SNOWFLAKE_ANALYTICS_DB) && export SNOWFLAKE_LOAD_DATABASE=$(SNOWFLAKE_LOAD_DB) && docker-compose run dbt_image bash -c "dbt deps && /bin/bash"
@docker-compose run dbt_image bash -c "dbt deps && /bin/bash"
init-airflow:
@echo "Initializing the Airflow DB..."
......
......@@ -87,14 +87,9 @@ services:
dbt_image:
image: registry.gitlab.com/gitlab-data/data-image/dbt-image:latest
environment:
SNOWFLAKE_ACCOUNT: ${SNOWFLAKE_ACCOUNT}
SNOWFLAKE_LOAD_DATABASE: ${SNOWFLAKE_LOAD_DATABASE}
SNOWFLAKE_USER: ${SNOWFLAKE_USER}
SNOWFLAKE_PASSWORD: ${SNOWFLAKE_PASSWORD}
SNOWFLAKE_TRANSFORM_DATABASE: ${SNOWFLAKE_TRANSFORM_DATABASE}
SNOWFLAKE_TRANSFORM_ROLE: ${SNOWFLAKE_TRANSFORM_ROLE}
SNOWFLAKE_TRANSFORM_WAREHOUSE: ${SNOWFLAKE_TRANSFORM_WAREHOUSE}
SNOWFLAKE_TRANSFORM_SCHEMA: ${SNOWFLAKE_TRANSFORM_SCHEMA}
DBT_PROFILES_DIR: /usr/local/dbt_profiles/
SNOWFLAKE_LOAD_DATABASE: "RAW"
SNOWFLAKE_TRANSFORM_WAREHOUSE: "ANALYST_XS"
restart: always
ports:
- "8081:8081"
......@@ -104,6 +99,10 @@ services:
- type: bind
source: .
target: /usr/local/analytics
- type: bind
source: ${DBT_PROFILE_PATH}
target: /usr/local/dbt_profiles/profiles.yml
read_only: True
volumes:
airflow_logs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment