Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Anna Scholtz 9759c46510 Make sure generate_sql script is compatible with cloud pipeline 2022-02-16 10:00:16 -08:00
Anna Scholtz b5f9ea4752 Update generate_sql script 2022-02-16 08:52:51 -08:00
Alexander Nicholson 45655229d3
Added sql_generators script to create schema.yaml files for derived views (#2657) 2022-01-13 15:46:06 -05:00
Anna Scholtz 678c5b2a6c Update glean_usage generate parameter in scripts 2022-01-07 15:07:12 -08:00
Anna Scholtz cf966d2280 Move stable view generation into separate module 2022-01-05 12:26:52 -08:00
Anna Scholtz 2b3eebe812 Update scripts and test for sql_generators/ 2022-01-03 14:15:02 -08:00
Anthony Miyaguchi d28ba56309
Remove generated-sql for glam (#2215) 2021-07-22 15:39:44 -07:00
Anthony Miyaguchi cd85090c25
Fix #2212 - Write glam sql to directory specified by SQL_DIR (#2213)
* Add option to write to an alternative directory in generate_glam_sql

* Add alternative sql directory in glam portion of generate_sql
2021-07-22 14:13:59 -07:00
Anthony Miyaguchi c6cabd4391
Add statements to generate glam queries for fenix (#2208)
* Add statements to generate glam queries for fenix

* Use newlines in single string for multiple products

* Move glam generation into generate_sql script

* Add documentation on ignoring target project
2021-07-22 15:31:25 -04:00
Jeff Klukas c6f0c3ce81
Allow generate_sql to twice without raising error (#2067)
Fixes https://github.com/mozilla/bigquery-etl/issues/2066
2021-05-24 16:36:11 -04:00
Jeff Klukas 7486920237
Fix inconsistent invocation of bqetl in script (#2037)
This is causing view deploys to fail with:

> Please run ./bqetl bootstrap
2021-05-18 12:41:59 -07:00
Anna Scholtz 4443a6e463 Specify output_dir in generate-sql script
Co-authored-by: Jeff Klukas <jklukas@mozilla.com>
2021-05-18 11:24:27 -07:00
Anna Scholtz 5eb0ada329 Review feedback 2021-05-18 11:24:27 -07:00
Anna Scholtz 7a3b4f499f Remove old glean generation scripts 2021-05-18 11:24:27 -07:00
Anna Scholtz cee749c4ba Backfill with init option 2021-05-18 11:24:27 -07:00
Anna Scholtz bc14ec8877 Generate Glean table when creating generated-sql branch 2021-05-18 11:24:27 -07:00
Anthony Miyaguchi 1503a7fa89
[DS-1424] Implementation of mobile clients first seen (#1934)
* Add initial boilerplate for clients_first_seen

* Remove submission_timestamp as a field

* [wip] Join data against legacy fennec id if applicable

* Remove user facing view

* Revert "Remove user facing view"

This reverts commit a728a7882170eadad5413c7a7046c0f38297bb87.

* Add flag for fennec_id

* Update logic to limit rows in partitions to submission_date

* Add all sql in glean_usage to format ignores

* Separate init and query

* Add default encoders for testing sql

* Add test for initialization of baseline clients first seen in fenix

* Update query to update over previous history

* Add test for aggregation

* Add generated sql and tests for simple baseline clients first seen

* Add dry-run exceptions for clients first seen tables

* Add clients first seen to generated sql

* Update bigquery_etl/glean_usage/templates/baseline_clients_first_seen.metadata.yaml

Co-authored-by: Jeff Klukas <jklukas@mozilla.com>

* Update bigquery_etl/glean_usage/templates/baseline_clients_first_seen.metadata.yaml

Co-authored-by: Jeff Klukas <jklukas@mozilla.com>

* Group by sample id instead of min

* Add submission_date as baseline first seen date

Co-authored-by: Jeff Klukas <jklukas@mozilla.com>
2021-04-05 11:36:39 -07:00
Daniel Thorn 024e993c44
Record table references in metadata.yaml (#1875) 2021-03-09 12:29:05 -05:00
Jeff Klukas dd6ddee6b9
Use dataset labels to speed up stable view generation (#1863)
* Use dataset labels to speed up stable view generation

Builds on new dry run affordance from
https://github.com/mozilla/bigquery-etl/pull/1858

We also remove the `--no-dry-run` option now since only the single dry run
is now needed, and stable view generation completes in less than 2 seconds.
2021-03-02 15:05:39 -05:00
Daniel Thorn 2ce8084dd9
Add option to generate stable views without dry run (#1814) 2021-02-18 12:02:21 -05:00
Jeff Klukas 0637808f95
Use probeinfo rather than BQ calls for glean_usage sql generation (#1786) 2021-02-16 13:26:11 -05:00
Anna Scholtz 97b5386b41 Change UDFs to persistent UDFs and remove sql generations script 2020-02-07 09:48:23 -08:00
Anna Scholtz b31fbe3497 Metadata publish improvements and update clients_daily_v6 metadata 2020-01-17 16:03:59 -08:00
Anna Scholtz 165fe50cc8 Script for updating metadata of table 2020-01-17 16:03:59 -08:00
Anna Scholtz 47f77b7c62 Copy metadata.yaml when generating SQL 2020-01-17 16:03:59 -08:00
Jeff Klukas 096a209ced Fix bugs in monitoring views
Also cleans up a bug in the script for publishing views to get udf_js/gunzip
working, and removes accidental print statements in generate_sql.
2019-10-10 11:48:28 -04:00
Jeff Klukas 68c4d79228 Replace sql dir all at once in generate_sql
I got tired of running generate_sql, then checking git status while it was
running and seeing a jumble of deleted files. This PR changes the behavior to
build the files in a temp dir and then copy into place only at the end.
2019-10-10 09:21:30 -04:00
Daniel Thorn e872a76860
Add pytest plugins to lint python scripts (#410)
* Add pytest plugins to lint python scripts

* Fix lint errors
2019-10-08 14:00:11 -07:00
Jeff Klukas f4c5ea8e7c Run black 2019-09-13 10:00:33 -04:00
Daniel Thorn 22520e31f6
Use prepend_udf_usage_definitions in generate_sql (#287) 2019-08-05 16:10:31 -07:00
Daniel Thorn e1bf990b9a
Add support for testing queries with persistent UDFs (#285) 2019-08-05 14:14:19 -07:00
Daniel Thorn f79d075448
Add dataset names to paths in sql/ (#265)
* Add dataset names to paths in sql/

* rename clients_last_seen_raw_v1 to clients_last_seen_v1

* rename telemetry_raw to telemetry_derived

* address review
2019-07-30 09:39:22 -07:00
Jeff Klukas 01cb6e1074 Refactor naming of UDFs 2019-07-24 09:01:13 -04:00
Anna Scholtz 7207a4e52f Move SQL templates to templates/ and add generated SQL 2019-06-25 08:07:26 -07:00
Anna Scholtz fe7325dcb4 Run SQL generation script in when creating docker image 2019-06-25 08:07:26 -07:00
Anna Scholtz aa637154c5 Ensure that UDFs are added only once and in order when generating SQL files 2019-06-25 08:07:26 -07:00
Anna Scholtz a6661c5896 Trigger SQL query generation in pytest and update CircleCI config 2019-06-25 08:07:26 -07:00
Anna Scholtz b62970f3a9 Makefile for generating sql and add newline breaks to new files 2019-06-25 08:07:26 -07:00