final fixes

This commit is contained in:
gregoriustanleyy 2025-04-08 22:01:32 +07:00
parent 2e22fad2fc
commit be735714d6
4 changed files with 14 additions and 5 deletions

View File

@ -44,4 +44,4 @@ jobs:
dbt deps
- name: Run DBT Jobs
run: |
dbt run -m external_models,tag:defillama external_models,tag:deepnftvalue external_models,tag:core external_models,tag:blast external_models,tag:polymarket external_models,tag:bitquery external_models,tag:oklink --exclude models/defillama/bronze/bronze__defillama_stablecoin_supply.sql+
dbt run -m external_models,tag:defillama external_models,tag:deepnftvalue external_models,tag:core external_models,tag:blast external_models,tag:polymarket external_models,tag:bitquery external_models,tag:oklink external_models,tag:artemis --exclude models/defillama/bronze/bronze__defillama_stablecoin_supply.sql+

View File

@ -44,4 +44,4 @@ jobs:
dbt deps
- name: Run DBT Jobs
run: |
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/bitquery/streamline/streamline__bitquery_realtime.sql 1+models/oklink/streamline/streamline__oklink_realtime.sql
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/bitquery/streamline/streamline__bitquery_realtime.sql 1+models/oklink/streamline/streamline__oklink_realtime.sql 1+models/artemis/streamline/streamline__artemis_realtime.sql

View File

@ -34,7 +34,7 @@ WITH bronze AS (
{% endif %}
),
extracted_dates AS (
SELECT DISTINCT
SELECT
request_date_day,
TO_DATE(date_vals.value:date::STRING) AS extracted_date,
data,
@ -49,7 +49,7 @@ extracted_dates AS (
WHERE
data:data:artemis_ids IS NOT NULL
)
SELECT DISTINCT
SELECT
extracted_date AS date_day,
data,
partition_key,
@ -60,6 +60,7 @@ SELECT DISTINCT
'{{ invocation_id }}' AS _invocation_id
FROM
extracted_dates
QUALIFY ROW_NUMBER() OVER (
PARTITION BY extracted_date
ORDER BY

View File

@ -16,11 +16,19 @@
WITH complete_data AS (
{% if is_incremental() %}
SELECT
*,
date_day,
_invocation_id,
MAX(date_day) OVER () AS max_complete_date
FROM
{{ ref("streamline__artemis_complete") }}
{% else %}
SELECT
null as date_day,
null as _invocation_id,
'2025-01-01'::DATE AS max_complete_date
{% endif %}
),
date_params AS (
SELECT