Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add community curation docker files #135

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SF_ACCOUNT=vna27887.us-east-1
SF_USERNAME=<YOUR SNOWFLAKE USERNAME>
SF_PASSWORD=<YOUR SNOWFLAKE PASSWORD>
SF_REGION=us-east-1
SF_DATABASE=POLYGON_COMMUNITY_DEV
SF_WAREHOUSE=FLIPSIDE_COMMUNITY_CURATOR
SF_ROLE=FLIPSIDE_COMMUNITY_CURATOR
SF_SCHEMA=SILVER
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ghcr.io/dbt-labs/dbt-snowflake:1.2.latest
WORKDIR /support
RUN mkdir /root/.dbt
COPY profiles.yml /root/.dbt
RUN mkdir /root/flow
WORKDIR /flow
COPY . .
EXPOSE 8080
ENTRYPOINT [ "bash"]
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SHELL := /bin/bash

dbt-console:
docker-compose run dbt_console

.PHONY: dbt-console
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.4"

services:
dbt_console:
build: .
volumes:
- .:/polygon
env_file:
- .env
7 changes: 7 additions & 0 deletions macros/run_sp_create_prod_community_clone.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% macro run_sp_create_prod_community_clone() %}
{% set clone_query %}
call polygon._internal.create_prod_clone('polygon', 'polygon_community_dev', 'flipside_community_curator');
{% endset %}

{% do run_query(clone_query) %}
{% endmacro %}
16 changes: 15 additions & 1 deletion profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,18 @@ polygon:
schema: "{{ env_var('SCHEMA') }}"
threads: 4
client_session_keep_alive: False
query_tag: polygon_curator
query_tag: polygon_curator
community_dev:
type: snowflake
account: "{{ env_var('SF_ACCOUNT') }}"
# User/password auth
user: "{{ env_var('SF_USERNAME') }}"
password: "{{ env_var('SF_PASSWORD') }}"
role: "{{ env_var('SF_ROLE') }}"
schema: "{{ env_var('SF_SCHEMA') }}"
region: "{{ env_var('SF_REGION') }}"
database: "{{ env_var('SF_DATABASE') }}"
warehouse: "{{ env_var('SF_WAREHOUSE') }}"
threads: 4
client_session_keep_alive: False
query_tag: polygon_curator