bigquery-etl/tests/cli
Lucia 9fc513ba9f
Generate query with shredder mitigation (#6060)
* Auxiliary functions required to generate the query for a backfill with shredder mitigation.

* Exception handling.

* isort & docstrings.

* Apply flake8 to test file.

* Remove variable assignment to different types.

* Make search case insensitive in function.

* Add test cases for function and update naming in a funcion's parameters for clarity.

* Update bigquery_etl/backfill/shredder_mitigation.py

Co-authored-by: Leli <33942105+lelilia@users.noreply.github.com>

* Add test cases for missing parameters or not matching parameters where expected. minimize the calls for get_bigquery_type().

* Encapsulate actions to generate and run custom queries to generate the subsets for shredder mitigation.

* Query template for shredder mitigation.

* Query template for shredder mitigation and formatting.

* Add check for "GROUP BY 1, 2, 3", improve code readibility, remove unnecesary properties in classes.

* Test coverage. Check for "GROUP BY 1, 2, 3", improve readibility, remove unrequired properties in class Subset.

* Increase test coverage. Expand DataType INTEGER required for UNION queries.

* Increase test coverage. Expand DataType INTEGER required for UNION queries.

* Separate INTEFER and NUMERIC types.

* Move util functions and convert method to property, both to resolve a circular import. Adjust tests. Update function return and tests.

* Adding backfill_date to exception message. Formatting.

* Adding backfill_date to exception message. Formatting.

---------

Co-authored-by: Leli <33942105+lelilia@users.noreply.github.com>
2024-09-06 16:21:56 +02:00
..
test_cli_alchemer.py Bug 1683765 - Backfill vpn surveys (#1659) 2021-01-12 13:20:29 -08:00
test_cli_backfill.py DENG-4283: Updated managed backfills backup table name (#5908) 2024-07-25 14:47:11 -07:00
test_cli_check.py Generate soft etl checks (#4268) 2023-09-13 10:22:39 -07:00
test_cli_dag.py Funnel generators POC (#4390) 2023-10-12 14:05:08 -07:00
test_cli_dependency.py Remove java dependency in favor of sqlglot (#3755) 2023-05-17 14:56:42 -07:00
test_cli_format.py Automatically sort python imports (#1840) 2021-02-24 17:11:52 -05:00
test_cli_metadata.py Add monitoring metadata support (#6152) 2024-09-04 13:03:59 -04:00
test_cli_query.py chore: refactor schema deploys, add and use deploy utils (#5674) 2024-05-30 16:23:53 -04:00
test_cli_routine.py Automatically sort python imports (#1840) 2021-02-24 17:11:52 -05:00
test_cli_static.py DENG-2928 Add metadata.yaml support for static tables in bqetl (#5105) 2024-04-25 11:27:39 -07:00
test_cli_utils.py Generate query with shredder mitigation (#6060) 2024-09-06 16:21:56 +02:00