diff --git a/models/core/txs.sql b/models/core/txs.sql index b3475c1..4152037 100644 --- a/models/core/txs.sql +++ b/models/core/txs.sql @@ -1,7 +1,7 @@ {{ config( materialized = 'incremental', - unique_key = 'tx_hash', + unique_key = 'tx_id', tags = ['core'], cluster_by = ['block_timestamp'] ) diff --git a/models/metrics/metric_miner_count.sql b/models/metrics/metric_miner_count.sql deleted file mode 100644 index 97826d1..0000000 --- a/models/metrics/metric_miner_count.sql +++ /dev/null @@ -1,28 +0,0 @@ -{{ config(materialized='table', tags=['metrics']) }} - --- WIP - example of creating metrics table/construct - -SELECT - date_trunc('day', block_timestamp) as metric_date, - 'daily' as metric_period, - count(distinct miner) as miner_count -FROM {{ ref("blocks") }} -GROUP BY 1 - -UNION ALL - -SELECT - date_trunc('hour', block_timestamp) as metric_date, - 'hourly' as metric_period, - count(distinct miner) as miner_count -FROM {{ ref("blocks") }} -GROUP BY 1 - -UNION ALL - -SELECT - date_trunc('minute', block_timestamp) as metric_date, - 'minute' as metric_period, - count(distinct miner) as miner_count -FROM {{ ref("blocks") }} -GROUP BY 1 diff --git a/models/metrics/schema.yml b/models/metrics/schema.yml deleted file mode 100644 index 47d9762..0000000 --- a/models/metrics/schema.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 2 - -models: - - name: metric_miner_count - description: "The distinct number of miners within a given period" - columns: - - name: metric_date - description: The date the metric occurred - tests: - - not_null - - name: metric_period - description: i.e. Hourly, Daily, etc. - tests: - - not_null - - name: miner_count - description: The distinct count of miners active in that period. - tests: - - not_null \ No newline at end of file