mirror of
https://github.com/FlipsideCrypto/crosschain-models.git
synced 2026-02-06 13:26:52 +00:00
Fix vaults token key name and adding tests (#344)
* adjust vault dr * test and token rename * fix_test * right path * rename test
This commit is contained in:
parent
3411b12a72
commit
bb14976e2f
2
.github/workflows/dbt_activity_yearly.yml
vendored
2
.github/workflows/dbt_activity_yearly.yml
vendored
@ -36,5 +36,5 @@ jobs:
|
||||
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'GB_TOKEN', frequency: ['last_year']}"
|
||||
dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'TOKEN', frequency: ['last_year']}"
|
||||
dbt run --model silver__github_activity
|
||||
|
||||
@ -36,5 +36,6 @@ jobs:
|
||||
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'GB_TOKEN', frequency: ['contributors']}"
|
||||
dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'TOKEN', frequency: ['contributors']}"
|
||||
dbt run --model silver__github_activity
|
||||
dbt test -s github_data_null
|
||||
|
||||
3
.github/workflows/dbt_general_weekly.yml
vendored
3
.github/workflows/dbt_general_weekly.yml
vendored
@ -36,5 +36,6 @@ jobs:
|
||||
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'GB_TOKEN', frequency: ['core']}"
|
||||
dbt run-operation get_github_repo_data --args "{GITHUB_TOKEN: 'TOKEN', frequency: ['core']}"
|
||||
dbt run --model silver__github_activity
|
||||
dbt test -s github_data_null
|
||||
|
||||
@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS {{ target.database }}.bronze_api.github_repo_data(
|
||||
|
||||
{% set event_table %}
|
||||
|
||||
CREATE TABLE IF NOT EXISTS {{ target.database }}.bronze_api.log_messages (
|
||||
CREATE OR REPLACE TABLE {{ target.database }}.bronze_api.log_messages (
|
||||
timestamp TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP(),
|
||||
log_level STRING,
|
||||
message STRING
|
||||
|
||||
22
tests/github__data_log.sql
Normal file
22
tests/github__data_log.sql
Normal file
@ -0,0 +1,22 @@
|
||||
WITH base AS (
|
||||
SELECT
|
||||
SPLIT_PART(MESSAGE, ',',2) AS status_code,
|
||||
count(*) as counter
|
||||
FROM
|
||||
{{ target.database }}.bronze_api.log_messages
|
||||
WHERE
|
||||
timestamp BETWEEN DATEADD(HOUR, -1, CURRENT_TIMESTAMP())
|
||||
AND CURRENT_TIMESTAMP()
|
||||
AND LOG_LEVEL = 'DEBUG'
|
||||
GROUP BY 1
|
||||
|
||||
)
|
||||
select
|
||||
status_code,
|
||||
counter
|
||||
from
|
||||
base
|
||||
where
|
||||
status_code not in (200, 202, 404, 451)
|
||||
and counter > 0
|
||||
and counter < 100
|
||||
Loading…
Reference in New Issue
Block a user