quick update to update the github action name (#332)

* quick update

* updated

* updated
This commit is contained in:
xiuy001 2023-08-23 14:13:53 -04:00 committed by GitHub
parent 54bc8c6b35
commit bd223de8ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 81 additions and 2 deletions

View File

@ -1,7 +1,8 @@
name: dbt_run_parser_program
run-name: dbt_run_parser_program
name: dbt_run_parser_program_retry
run-name: dbt_run_parser_program_retry
on:
workflow_dispatch:
schedule:
# Runs every day (see https://crontab.guru)
- cron: '0 2 * * *'

View File

@ -0,0 +1,44 @@
name: dbt_run_parser_program_unknown
run-name: dbt_run_parser_program_unknown
on:
workflow_dispatch:
schedule:
# Runs every day (see https://crontab.guru)
- cron: '0 2 * * *'
env:
DBT_PROFILES_DIR: "${{ secrets.DBT_PROFILES_DIR }}"
ACCOUNT: "${{ secrets.ACCOUNT }}"
ROLE: "${{ secrets.ROLE }}"
USER: "${{ secrets.USER }}"
PASSWORD: "${{ secrets.PASSWORD }}"
REGION: "${{ secrets.REGION }}"
DATABASE: "${{ secrets.DATABASE }}"
WAREHOUSE: "${{ secrets.WAREHOUSE }}"
SCHEMA: "${{ secrets.SCHEMA }}"
concurrency:
group: ${{ github.workflow }}
jobs:
run_dbt_jobs:
runs-on: ubuntu-latest
environment:
name: workflow_prod
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python-version: "3.7.x"
- name: install dependencies
run: |
pip3 install dbt-snowflake==${{ secrets.DBT_VERSION }} cli_passthrough requests click
dbt deps
- name: Run DBT Jobs
run: |
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m ./models/streamline/parser/streamline__unknown_error_instructions.sql

View File

@ -0,0 +1,34 @@
{{ config (
materialized = "view",
post_hook = if_data_call_function(
func = "{{this.schema}}.udf_bulk_program_parser(object_construct('realtime', 'retry'))",
target = "{{this.schema}}.{{this.identifier}}"
)
) }}
WITH retry AS (
SELECT
program_id,
tx_id,
INDEX,
block_id
FROM
{{ ref('silver__decoded_instructions') }}
WHERE decoded_instruction = 'Unknown instruction, IDL doesnt include this instruction'
)
SELECT
e.program_id,
e.tx_id,
e.index,
e.instruction,
e.block_id,
e.block_timestamp
FROM
{{ ref('silver__events') }}
e
INNER JOIN retry
ON e.program_id = retry.program_id
AND e.tx_id = retry.tx_id
AND e.index = retry.index
AND e.block_id = retry.block_id