Skip to content

Commit

Permalink
single dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed Dec 2, 2024
1 parent d46b68e commit 8d316ce
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 336 deletions.
6 changes: 3 additions & 3 deletions definitions/output/reports/metrics_dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const metrics = configs.listMetrics()

metrics.forEach(metric => {
metric.SQL.forEach(sql => {
publish(metric.id, {
publish(metric.id + '_' + sql.type, {
type: 'incremental',
protected: true,
bigquery: sql.type === 'histogram' ? { partitionBy: 'date', clusterBy: ['client'] } : {},
schema: 'reports_' + sql.type,
tags: ['crawl_reports']
schema: 'reports',
tags: ['crawl_complete', 'crawl_reports']
}).preOps(ctx => `
DELETE FROM ${ctx.self()}
WHERE date = '${params.date}';
Expand Down
4 changes: 2 additions & 2 deletions definitions/output/reports_cwv_tech/adoption.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pastMonth = constants.fnPastMonth(constants.currentMonth)

publish('adoption', {
schema: 'reports_cwv_tech',
publish('cwv_tech_adoption', {
schema: 'reports',
type: 'incremental',
protected: true,
bigquery: {
Expand Down
4 changes: 2 additions & 2 deletions definitions/output/reports_cwv_tech/categories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pastMonth = constants.fnPastMonth(constants.currentMonth)

publish('categories', {
schema: 'reports_cwv_tech',
publish('cwv_tech_categories', {
schema: 'reports',
type: 'table',
tags: ['cwv_tech_report']
}).query(ctx => `
Expand Down
4 changes: 2 additions & 2 deletions definitions/output/reports_cwv_tech/core_web_vitals.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pastMonth = constants.fnPastMonth(constants.currentMonth)

publish('core_web_vitals', {
schema: 'reports_cwv_tech',
publish('cwv_tech_core_web_vitals', {
schema: 'reports',
type: 'incremental',
protected: true,
bigquery: {
Expand Down
4 changes: 2 additions & 2 deletions definitions/output/reports_cwv_tech/lighthouse.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pastMonth = constants.fnPastMonth(constants.currentMonth)

publish('lighthouse', {
schema: 'reports_cwv_tech',
publish('cwv_tech_lighthouse', {
schema: 'reports',
type: 'incremental',
protected: true,
bigquery: {
Expand Down
4 changes: 2 additions & 2 deletions definitions/output/reports_cwv_tech/page_weight.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pastMonth = constants.fnPastMonth(constants.currentMonth)

publish('page_weight', {
schema: 'reports_cwv_tech',
publish('cwv_tech_page_weight', {
schema: 'reports',
type: 'incremental',
protected: true,
bigquery: {
Expand Down
4 changes: 2 additions & 2 deletions definitions/output/reports_cwv_tech/technologies.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pastMonth = constants.fnPastMonth(constants.currentMonth)

publish('technologies', {
schema: 'reports_cwv_tech',
publish('cwv_tech_technologies', {
schema: 'reports',
type: 'table',
tags: ['cwv_tech_report']
}).query(ctx => `
Expand Down
Loading

0 comments on commit 8d316ce

Please sign in to comment.