mirror of
https://github.com/FlipsideCrypto/polygon-models.git
synced 2026-02-06 15:51:46 +00:00
Add transactions job (#58)
* added the profiles * added the profiles * added the profiles * added the profiles * added the profiles * updated the path * updated the path * updated * updated * updated the path * updated the target * Add transactions job Co-authored-by: yulike <xiuyangguan@gmail.com>
This commit is contained in:
parent
e7e88815f1
commit
eea2e44963
38
.github/workflows/dbt_run_adhoc.yml
vendored
Normal file
38
.github/workflows/dbt_run_adhoc.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: adhoc_dbt_run
|
||||
run-name: call_workflow_template
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- main
|
||||
- add_workflow_action
|
||||
- added_profiles
|
||||
inputs:
|
||||
dbt_command:
|
||||
type: string
|
||||
description: 'DBT Run Command'
|
||||
required: true
|
||||
|
||||
env:
|
||||
DBT_PROFILES_DIR: ./
|
||||
|
||||
ACCOUNT: "${{ secrets.ACCOUNT }}"
|
||||
ROLE: "${{ secrets.ROLE }}"
|
||||
USER: "${{ secrets.USER }}"
|
||||
PASSWORD: "${{ secrets.PASSWORD }}"
|
||||
REGION: "${{ secrets.REGION }}"
|
||||
DATABASE_DEV: "${{ secrets.DATABASE_DEV }}"
|
||||
DATABASE_PROD: "${{ secrets.DATABASE_PROD }}"
|
||||
WAREHOUSE_DEV: "${{ secrets.WAREHOUSE_DEV }}"
|
||||
WAREHOUSE_PROD: "${{ secrets.WAREHOUSE_PROD }}"
|
||||
SCHEMA: "${{ secrets.SCHEMA }}"
|
||||
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/run_chain_template.yml@main
|
||||
with:
|
||||
dbt_command: ${{ inputs.dbt_command }}
|
||||
secrets: inherit # pass all secrets
|
||||
|
||||
|
||||
@ -6,10 +6,11 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- add_workflow_action
|
||||
- added_profiles
|
||||
schedule:
|
||||
# Runs "every 6 hours" (see https://crontab.guru)
|
||||
- cron: '0 */1 * * *'
|
||||
|
||||
|
||||
env:
|
||||
DBT_PROFILES_DIR: ./
|
||||
|
||||
@ -29,6 +30,7 @@ jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/run_chain_template.yml@main
|
||||
with:
|
||||
dbt_command: "dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/silver/streamline/streamline__blocks_realtime.sql"
|
||||
dbt_command: "dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/silver/streamline/streamline__blocks_realtime.sql 1+models/silver/streamline/streamline__transactions_realtime.sql"
|
||||
secrets: inherit # pass all secrets
|
||||
|
||||
|
||||
29
profiles.yml
Normal file
29
profiles.yml
Normal file
@ -0,0 +1,29 @@
|
||||
polygon:
|
||||
target: dev
|
||||
outputs:
|
||||
dev:
|
||||
type: snowflake
|
||||
account: "{{ env_var('ACCOUNT') }}"
|
||||
role: "{{ env_var('ROLE') }}"
|
||||
user: "{{ env_var('USER') }}"
|
||||
password: "{{ env_var('PASSWORD') }}"
|
||||
region: "{{ env_var('REGION') }}"
|
||||
database: "{{ env_var('DATABASE_DEV') }}"
|
||||
warehouse: "{{ env_var('WAREHOUSE_DEV') }}"
|
||||
schema: "{{ env_var('SCHEMA') }}"
|
||||
threads: 4
|
||||
client_session_keep_alive: False
|
||||
query_tag: polygon_curator
|
||||
prod:
|
||||
type: snowflake
|
||||
account: "{{ env_var('ACCOUNT') }}"
|
||||
role: "{{ env_var('ROLE') }}"
|
||||
user: "{{ env_var('USER') }}"
|
||||
password: "{{ env_var('PASSWORD') }}"
|
||||
region: "{{ env_var('REGION') }}"
|
||||
database: "{{ env_var('DATABASE_PROD') }}"
|
||||
warehouse: "{{ env_var('WAREHOUSE_PROD') }}"
|
||||
schema: "{{ env_var('SCHEMA') }}"
|
||||
threads: 4
|
||||
client_session_keep_alive: False
|
||||
query_tag: polygon_curator
|
||||
Loading…
Reference in New Issue
Block a user