datajunction 0.0.2.dev0__tar.gz → 0.0.2.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datajunction-0.0.2.dev4/Makefile +13 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/PKG-INFO +1 -1
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/__about__.py +1 -1
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/cli.py +10 -17
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/deployment.py +17 -6
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_cli.py +10 -33
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_compile.py +6 -6
- datajunction-0.0.2.dev4/tests/test_deploy.py +176 -0
- datajunction-0.0.2.dev0/Makefile +0 -13
- datajunction-0.0.2.dev0/target/dj.yaml +0 -3
- datajunction-0.0.2.dev0/target/draft_ms.yaml +0 -86
- datajunction-0.0.2.dev0/target/draft_ms_with_qpd.yaml +0 -78
- datajunction-0.0.2.dev0/target/engagement_quality_score.yaml +0 -12
- datajunction-0.0.2.dev0/target/overall_streaming_lift.yaml +0 -8
- datajunction-0.0.2.dev0/target/playbacks.yaml +0 -123
- datajunction-0.0.2.dev0/target/qpd.yaml +0 -16
- datajunction-0.0.2.dev0/target/qpd_normalization__35.yaml +0 -13
- datajunction-0.0.2.dev0/target/total_missing_covariates.yaml +0 -19
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/.coveragerc +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/.gitignore +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/.isort.cfg +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/.pre-commit-config.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/LICENSE.txt +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/README.md +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/__init__.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/_base.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/_internal.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/admin.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/builder.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/client.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/compile.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/exceptions.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/models.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/nodes.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/init_system_nodes.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/date.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/dimension_link.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/is_active.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/materialization.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/node_type.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/node_without_description.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/nodes.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/number_of_materializations.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/number_of_nodes.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/user.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/datajunction/tags.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/pdm.lock +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/pyproject.toml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/setup.cfg +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/__init__.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/conftest.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/companies.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/companies_dim.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/contractor.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/contractors.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/us_state.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/us_states.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/date.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/dispatchers.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/hard_hats.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_orders.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_type.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/us_region.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project10/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/date.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/dispatchers.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/hard_hats.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_orders.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_type.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/us_region.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project11/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/companies.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project2/.ipynb_checkpoints/some_node.source-checkpoint.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project2/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project2/some_node.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project3/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project3/some_node.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project4/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project4/very/very/deeply/nested/namespace/some_node.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project5/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project5/some_node.a.b.c.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project6/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project6/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project6/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project7/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project7/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project7/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project8/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/dj.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/companies.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/examples.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test__internal.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_admin.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_base.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_builder.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_client.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_generated_client.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_integration.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tests/test_models.py +0 -0
- {datajunction-0.0.2.dev0 → datajunction-0.0.2.dev4}/tox.ini +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
check:
|
|
2
|
+
pdm run pre-commit run --all-files
|
|
3
|
+
|
|
4
|
+
lint:
|
|
5
|
+
make check
|
|
6
|
+
|
|
7
|
+
test:
|
|
8
|
+
pdm run pytest -n auto --cov=datajunction --cov-report term-missing -vv tests/ --doctest-modules datajunction --without-integration --without-slow-integration ${PYTEST_ARGS}
|
|
9
|
+
|
|
10
|
+
dev-release:
|
|
11
|
+
hatch version dev
|
|
12
|
+
hatch build
|
|
13
|
+
hatch publish
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: datajunction
|
|
3
|
-
Version: 0.0.2.
|
|
3
|
+
Version: 0.0.2.dev4
|
|
4
4
|
Summary: DataJunction client library for connecting to a DataJunction server
|
|
5
5
|
Project-URL: repository, https://github.com/DataJunction/dj
|
|
6
6
|
Author-email: DataJunction Authors <yian.shang@gmail.com>
|
|
@@ -22,22 +22,11 @@ class DJCLI:
|
|
|
22
22
|
self.builder_client = builder_client or DJBuilder()
|
|
23
23
|
self.deployment_service = DeploymentService(client=self.builder_client)
|
|
24
24
|
|
|
25
|
-
def
|
|
26
|
-
"""
|
|
27
|
-
Deploy nodes from the specified directory.
|
|
28
|
-
"""
|
|
29
|
-
project = Project.load(directory)
|
|
30
|
-
compiled_project = project.compile()
|
|
31
|
-
if dryrun:
|
|
32
|
-
compiled_project.validate(client=self.builder_client)
|
|
33
|
-
else:
|
|
34
|
-
compiled_project.deploy(client=self.builder_client)
|
|
35
|
-
|
|
36
|
-
def push(self, directory: str):
|
|
25
|
+
def push(self, directory: str, namespace: str | None = None):
|
|
37
26
|
"""
|
|
38
27
|
Alias for deploy without dryrun.
|
|
39
28
|
"""
|
|
40
|
-
self.deployment_service.push(directory)
|
|
29
|
+
self.deployment_service.push(directory, namespace=namespace)
|
|
41
30
|
|
|
42
31
|
def pull(self, namespace: str, directory: str):
|
|
43
32
|
"""
|
|
@@ -79,6 +68,12 @@ class DJCLI:
|
|
|
79
68
|
"directory",
|
|
80
69
|
help="Path to the directory containing YAML files",
|
|
81
70
|
)
|
|
71
|
+
push_parser.add_argument(
|
|
72
|
+
"--namespace",
|
|
73
|
+
type=str,
|
|
74
|
+
default=None,
|
|
75
|
+
help="The namespace to push to (optionally overrides the namespace in the YAML files)",
|
|
76
|
+
)
|
|
82
77
|
|
|
83
78
|
# `dj pull <namespace> <directory>`
|
|
84
79
|
pull_parser = subparsers.add_parser(
|
|
@@ -105,10 +100,8 @@ class DJCLI:
|
|
|
105
100
|
"""
|
|
106
101
|
Dispatches the command based on the parsed args
|
|
107
102
|
"""
|
|
108
|
-
if args.command == "
|
|
109
|
-
self.
|
|
110
|
-
elif args.command == "push":
|
|
111
|
-
self.push(args.directory)
|
|
103
|
+
if args.command == "push":
|
|
104
|
+
self.push(args.directory, namespace=args.namespace)
|
|
112
105
|
elif args.command == "pull":
|
|
113
106
|
self.pull(args.namespace, args.directory)
|
|
114
107
|
elif args.command == "seed":
|
|
@@ -96,7 +96,7 @@ class DeploymentService:
|
|
|
96
96
|
def build_table(deployment_uuid: str, data: dict) -> Table:
|
|
97
97
|
"""Return a fresh Table with current deployment results."""
|
|
98
98
|
table = Table(
|
|
99
|
-
title=f"Deployment {deployment_uuid}",
|
|
99
|
+
title=f"Deployment [bold green]{deployment_uuid}[/ bold green]\nNamespace [bold green]{data['namespace']}[/ bold green]",
|
|
100
100
|
box=box.SIMPLE_HEAVY,
|
|
101
101
|
expand=True,
|
|
102
102
|
)
|
|
@@ -106,19 +106,28 @@ class DeploymentService:
|
|
|
106
106
|
table.add_column("Status", style="green")
|
|
107
107
|
table.add_column("Message", style="white")
|
|
108
108
|
|
|
109
|
+
color_mapping = {
|
|
110
|
+
"success": "bold green",
|
|
111
|
+
"failed": "bold red",
|
|
112
|
+
"pending": "yellow",
|
|
113
|
+
"skipped": "bold gray",
|
|
114
|
+
}
|
|
115
|
+
|
|
109
116
|
for result in data.get("results", []):
|
|
117
|
+
color = color_mapping.get(result.get("status"), "white")
|
|
110
118
|
table.add_row(
|
|
111
119
|
str(result.get("deploy_type", "")),
|
|
112
120
|
str(result.get("name", "")),
|
|
113
121
|
str(result.get("operation", "")),
|
|
114
|
-
|
|
115
|
-
|
|
122
|
+
f"[{color}]{result.get('status', '')}[/{color}]",
|
|
123
|
+
f"[gray]{result.get('message', '')}[/gray]",
|
|
116
124
|
)
|
|
117
125
|
return table
|
|
118
126
|
|
|
119
127
|
def push(
|
|
120
128
|
self,
|
|
121
129
|
source_path: str | Path,
|
|
130
|
+
namespace: str | None = None,
|
|
122
131
|
console: Console = Console(),
|
|
123
132
|
):
|
|
124
133
|
"""
|
|
@@ -127,12 +136,13 @@ class DeploymentService:
|
|
|
127
136
|
console.print(f"[bold]Pushing project from:[/bold] {source_path}")
|
|
128
137
|
|
|
129
138
|
deployment_spec = self._reconstruct_deployment_spec(source_path)
|
|
139
|
+
deployment_spec["namespace"] = namespace or deployment_spec.get("namespace")
|
|
130
140
|
deployment_data = self.client.deploy(deployment_spec)
|
|
131
141
|
deployment_uuid = deployment_data["uuid"]
|
|
132
142
|
|
|
133
|
-
console.print(f"[bold]Deployment initiated:[/bold] UUID {deployment_uuid}\n")
|
|
143
|
+
# console.print(f"[bold]Deployment initiated:[/bold] UUID {deployment_uuid}\n")
|
|
134
144
|
|
|
135
|
-
#
|
|
145
|
+
# Max wait time for deployment to finish
|
|
136
146
|
timeout = time.time() + 300 # 5 minutes
|
|
137
147
|
|
|
138
148
|
with Live(
|
|
@@ -152,8 +162,9 @@ class DeploymentService:
|
|
|
152
162
|
raise DJClientException("Deployment timed out after 5 minutes")
|
|
153
163
|
|
|
154
164
|
live.update(DeploymentService.build_table(deployment_uuid, deployment_data))
|
|
165
|
+
color = "green" if deployment_data.get("status") == "success" else "red"
|
|
155
166
|
console.print(
|
|
156
|
-
f"\
|
|
167
|
+
f"\nDeployment finished: [bold {color}]{deployment_data.get('status').upper()}[/bold {color}]",
|
|
157
168
|
)
|
|
158
169
|
|
|
159
170
|
@staticmethod
|
|
@@ -13,39 +13,6 @@ from datajunction import DJBuilder
|
|
|
13
13
|
from datajunction.cli import main
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
def test_deploy(change_to_project_dir: Callable):
|
|
17
|
-
"""
|
|
18
|
-
Test `dj deploy <dir>`
|
|
19
|
-
"""
|
|
20
|
-
builder_client = mock.MagicMock()
|
|
21
|
-
|
|
22
|
-
# Test deploy with dryrun
|
|
23
|
-
change_to_project_dir("./")
|
|
24
|
-
test_args = ["dj", "deploy", "./project9", "--dryrun"]
|
|
25
|
-
with patch.object(sys, "argv", test_args):
|
|
26
|
-
main(builder_client=builder_client)
|
|
27
|
-
|
|
28
|
-
func_names = [mock_call[0] for mock_call in builder_client.mock_calls]
|
|
29
|
-
assert "basic_login" in func_names
|
|
30
|
-
assert "create_namespace" in func_names
|
|
31
|
-
assert "create_source" in func_names
|
|
32
|
-
assert "create_dimension" in func_names
|
|
33
|
-
assert "delete_namespace" in func_names
|
|
34
|
-
|
|
35
|
-
# Test deploy without dryrun
|
|
36
|
-
change_to_project_dir("./")
|
|
37
|
-
test_args = ["dj", "deploy", "./project9"]
|
|
38
|
-
with patch.object(sys, "argv", test_args):
|
|
39
|
-
main(builder_client=builder_client)
|
|
40
|
-
|
|
41
|
-
func_names = [mock_call[0] for mock_call in builder_client.mock_calls]
|
|
42
|
-
assert "basic_login" in func_names
|
|
43
|
-
assert "create_namespace" in func_names
|
|
44
|
-
assert "create_source" in func_names
|
|
45
|
-
assert "create_dimension" in func_names
|
|
46
|
-
assert "delete_namespace" in func_names
|
|
47
|
-
|
|
48
|
-
|
|
49
16
|
def test_pull(
|
|
50
17
|
tmp_path,
|
|
51
18
|
builder_client: DJBuilder, # pylint: disable=redefined-outer-name
|
|
@@ -84,6 +51,16 @@ def test_push_full(
|
|
|
84
51
|
results = builder_client.list_nodes(namespace="deps.deploy0")
|
|
85
52
|
assert len(results) == 6
|
|
86
53
|
|
|
54
|
+
test_args = ["dj", "push", "./deploy0", "--namespace", "deps.deploy0.main"]
|
|
55
|
+
with patch.dict(os.environ, env_vars, clear=False):
|
|
56
|
+
with patch.object(sys, "argv", test_args):
|
|
57
|
+
main(builder_client=builder_client)
|
|
58
|
+
|
|
59
|
+
results = builder_client.list_nodes(namespace="deps.deploy0.main")
|
|
60
|
+
assert len(results) == 6
|
|
61
|
+
results = builder_client.list_nodes(namespace="deps.deploy0")
|
|
62
|
+
assert len(results) == 12
|
|
63
|
+
|
|
87
64
|
|
|
88
65
|
def test_seed():
|
|
89
66
|
"""
|
|
@@ -294,11 +294,11 @@ def test_compile_deploying_a_project(
|
|
|
294
294
|
assert [
|
|
295
295
|
link["dimension"]["name"] for link in local_hard_hats["dimension_links"]
|
|
296
296
|
] == ["projects.project1.roads.us_state"]
|
|
297
|
-
assert [
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
] == ["projects.project1.roads.date_dim"]
|
|
297
|
+
# assert [
|
|
298
|
+
# col["dimension"]["name"]
|
|
299
|
+
# for col in local_hard_hats["columns"]
|
|
300
|
+
# if col["name"] == "birth_date"
|
|
301
|
+
# ] == ["projects.project1.roads.date_dim"]
|
|
302
302
|
|
|
303
303
|
# Check metric metadata and required dimensions
|
|
304
304
|
avg_repair_price = builder_client.metric("projects.project1.roads.avg_repair_price")
|
|
@@ -363,7 +363,7 @@ def test_compile_raising_on_invalid_table_name(
|
|
|
363
363
|
project = Project.load_current()
|
|
364
364
|
with pytest.raises(DJClientException) as exc_info:
|
|
365
365
|
project.compile()
|
|
366
|
-
assert "Invalid
|
|
366
|
+
assert "Invalid" in str(exc_info.value)
|
|
367
367
|
|
|
368
368
|
|
|
369
369
|
def test_compile_raising_on_invalid_file_name(
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import io
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import time
|
|
4
|
+
from unittest import mock
|
|
5
|
+
import pytest
|
|
6
|
+
from unittest.mock import MagicMock
|
|
7
|
+
from datajunction.deployment import DeploymentService
|
|
8
|
+
from datajunction.exceptions import DJClientException
|
|
9
|
+
import yaml
|
|
10
|
+
from rich.console import Console
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_clean_dict_removes_nones_and_empty():
|
|
14
|
+
dirty = {
|
|
15
|
+
"a": None,
|
|
16
|
+
"b": [],
|
|
17
|
+
"c": {},
|
|
18
|
+
"d": {"x": None, "y": {"z": []}, "k": "keep"},
|
|
19
|
+
"e": [1, 2],
|
|
20
|
+
}
|
|
21
|
+
cleaned = DeploymentService.clean_dict(dirty)
|
|
22
|
+
assert cleaned == {"d": {"k": "keep"}, "e": [1, 2]}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_pull_writes_yaml_files(tmp_path):
|
|
26
|
+
# fake client returning a minimal deployment spec
|
|
27
|
+
client = MagicMock()
|
|
28
|
+
client._export_namespace_spec.return_value = {
|
|
29
|
+
"namespace": "foo.bar",
|
|
30
|
+
"nodes": [
|
|
31
|
+
{"name": "foo.bar.baz", "query": "SELECT 1"},
|
|
32
|
+
{"name": "foo.bar.qux", "query": "SELECT 2"},
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
svc = DeploymentService(client)
|
|
36
|
+
|
|
37
|
+
svc.pull("foo.bar", tmp_path)
|
|
38
|
+
|
|
39
|
+
# project-level yaml
|
|
40
|
+
project_yaml = yaml.safe_load((tmp_path / "dj.yaml").read_text())
|
|
41
|
+
assert project_yaml["namespace"] == "foo.bar"
|
|
42
|
+
|
|
43
|
+
# node files
|
|
44
|
+
baz_file = tmp_path / "foo" / "bar" / "baz.yaml"
|
|
45
|
+
assert baz_file.exists()
|
|
46
|
+
assert yaml.safe_load(baz_file.read_text())["query"] == "SELECT 1"
|
|
47
|
+
|
|
48
|
+
qux_file = tmp_path / "foo" / "bar" / "qux.yaml"
|
|
49
|
+
assert qux_file.exists()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_pull_raises_if_target_not_empty(tmp_path):
|
|
53
|
+
(tmp_path / "something.txt").write_text("not empty")
|
|
54
|
+
client = MagicMock()
|
|
55
|
+
svc = DeploymentService(client)
|
|
56
|
+
with pytest.raises(DJClientException):
|
|
57
|
+
svc.pull("ns", tmp_path)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def test_build_table_has_expected_columns():
|
|
61
|
+
tbl = DeploymentService.build_table(
|
|
62
|
+
"abc-123",
|
|
63
|
+
{
|
|
64
|
+
"namespace": "some.namespace",
|
|
65
|
+
"status": "success",
|
|
66
|
+
"results": [
|
|
67
|
+
{
|
|
68
|
+
"deploy_type": "node",
|
|
69
|
+
"name": "some.random.node",
|
|
70
|
+
"operation": "create",
|
|
71
|
+
"status": "success",
|
|
72
|
+
"message": "ok",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
)
|
|
77
|
+
cols = [c.header for c in tbl.columns]
|
|
78
|
+
assert cols == ["Type", "Name", "Operation", "Status", "Message"]
|
|
79
|
+
row_values = [col._cells[0] for col in tbl.columns]
|
|
80
|
+
assert row_values == [
|
|
81
|
+
"node",
|
|
82
|
+
"some.random.node",
|
|
83
|
+
"create",
|
|
84
|
+
"[bold green]success[/bold green]",
|
|
85
|
+
"[gray]ok[/gray]",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def test_reconstruct_deployment_spec(tmp_path):
|
|
90
|
+
# set up a fake exported project
|
|
91
|
+
(tmp_path / "dj.yaml").write_text(
|
|
92
|
+
yaml.safe_dump({"namespace": "foo", "tags": ["t1"]}),
|
|
93
|
+
)
|
|
94
|
+
node_dir = tmp_path / "foo"
|
|
95
|
+
node_dir.mkdir()
|
|
96
|
+
node_file = node_dir / "bar.yaml"
|
|
97
|
+
node_file.write_text(yaml.safe_dump({"name": "foo.bar", "query": "SELECT 1"}))
|
|
98
|
+
|
|
99
|
+
svc = DeploymentService(MagicMock())
|
|
100
|
+
spec = svc._reconstruct_deployment_spec(tmp_path)
|
|
101
|
+
assert spec["namespace"] == "foo"
|
|
102
|
+
assert spec["tags"] == ["t1"]
|
|
103
|
+
assert spec["nodes"][0]["name"] == "foo.bar"
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@pytest.mark.timeout(2)
|
|
107
|
+
def test_push_waits_until_success(monkeypatch, tmp_path):
|
|
108
|
+
# Create a fake project structure so _reconstruct_deployment_spec returns something
|
|
109
|
+
(tmp_path / "dj.yaml").write_text(yaml.safe_dump({"namespace": "foo"}))
|
|
110
|
+
(tmp_path / "foo.yaml").write_text(yaml.safe_dump({"name": "foo.bar"}))
|
|
111
|
+
|
|
112
|
+
# Fake client that returns "pending" once then "success"
|
|
113
|
+
client = MagicMock()
|
|
114
|
+
responses = [
|
|
115
|
+
{"uuid": "123", "status": "pending", "results": [], "namespace": "foo"},
|
|
116
|
+
{"uuid": "123", "status": "success", "results": [], "namespace": "foo"},
|
|
117
|
+
]
|
|
118
|
+
client.deploy.return_value = responses[0]
|
|
119
|
+
client.check_deployment.side_effect = responses[1:]
|
|
120
|
+
|
|
121
|
+
svc = DeploymentService(client, console=Console(file=io.StringIO()))
|
|
122
|
+
monkeypatch.setattr(time, "sleep", lambda _: None)
|
|
123
|
+
|
|
124
|
+
svc.push(tmp_path) # should not raise
|
|
125
|
+
|
|
126
|
+
client.deploy.assert_called_once()
|
|
127
|
+
client.check_deployment.assert_called()
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def test_push_times_out(monkeypatch, tmp_path):
|
|
131
|
+
# minimal project structure so _reconstruct_deployment_spec works
|
|
132
|
+
(tmp_path / "dj.yaml").write_text(yaml.safe_dump({"namespace": "foo"}))
|
|
133
|
+
(tmp_path / "foo.yaml").write_text(yaml.safe_dump({"name": "foo.bar"}))
|
|
134
|
+
|
|
135
|
+
# Fake client: deploy returns a uuid, check_deployment always 'pending'
|
|
136
|
+
client = MagicMock()
|
|
137
|
+
client.deploy.return_value = {
|
|
138
|
+
"uuid": "123",
|
|
139
|
+
"status": "pending",
|
|
140
|
+
"results": [],
|
|
141
|
+
"namespace": "foo",
|
|
142
|
+
}
|
|
143
|
+
client.check_deployment.return_value = {
|
|
144
|
+
"uuid": "123",
|
|
145
|
+
"status": "pending",
|
|
146
|
+
"results": [],
|
|
147
|
+
"namespace": "foo",
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
svc = DeploymentService(client, console=Console(file=io.StringIO()))
|
|
151
|
+
|
|
152
|
+
# Patch time.sleep to skip waiting
|
|
153
|
+
monkeypatch.setattr(time, "sleep", lambda _: None)
|
|
154
|
+
|
|
155
|
+
# Simulate time moving past the timeout on the second call
|
|
156
|
+
start_time = 1_000_000
|
|
157
|
+
times = [start_time, start_time + 301] # second call is > 5 minutes later
|
|
158
|
+
monkeypatch.setattr(time, "time", lambda: times.pop(0))
|
|
159
|
+
|
|
160
|
+
with pytest.raises(DJClientException, match="Deployment timed out"):
|
|
161
|
+
svc.push(tmp_path)
|
|
162
|
+
|
|
163
|
+
client.deploy.assert_called_once()
|
|
164
|
+
client.check_deployment.assert_called()
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def test_read_project_yaml_returns_empty(tmp_path: Path):
|
|
168
|
+
"""
|
|
169
|
+
Verify that when dj.yaml is missing, _read_project_yaml returns an empty dict.
|
|
170
|
+
"""
|
|
171
|
+
# Create a directory without dj.yaml
|
|
172
|
+
project_dir = tmp_path
|
|
173
|
+
client = mock.MagicMock()
|
|
174
|
+
svc = DeploymentService(client, console=Console(file=io.StringIO()))
|
|
175
|
+
result = svc._read_project_yaml(project_dir)
|
|
176
|
+
assert result == {}
|
datajunction-0.0.2.dev0/Makefile
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
check:
|
|
2
|
-
pdm run pre-commit run --all-files
|
|
3
|
-
|
|
4
|
-
lint:
|
|
5
|
-
make check
|
|
6
|
-
|
|
7
|
-
test:
|
|
8
|
-
pdm run pytest -n auto --cov=datajunction --cov-report=term -vv tests/ --doctest-modules datajunction --without-integration --without-slow-integration ${PYTEST_ARGS}
|
|
9
|
-
|
|
10
|
-
dev-release:
|
|
11
|
-
hatch version dev
|
|
12
|
-
hatch build
|
|
13
|
-
hatch publish
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
name: ${prefix}draft_ms
|
|
2
|
-
node_type: cube
|
|
3
|
-
owners:
|
|
4
|
-
- dj
|
|
5
|
-
display_name: Draft MS
|
|
6
|
-
description: ''
|
|
7
|
-
mode: published
|
|
8
|
-
metrics:
|
|
9
|
-
- ${prefix}total_missing_covariates
|
|
10
|
-
- ${prefix}overall_streaming_lift
|
|
11
|
-
- ${prefix}engagement_quality_score
|
|
12
|
-
- ${prefix}qpd_normalization__35
|
|
13
|
-
dimensions:
|
|
14
|
-
- common.dimensions.client_category.client_name
|
|
15
|
-
- common.dimensions.hardware_category.hw_category
|
|
16
|
-
- common.dimensions.xp.ab_test_plan.group_id
|
|
17
|
-
- common.dimensions.xp.allocation_day.alloc_country_iso_code
|
|
18
|
-
- common.dimensions.xp.measure_date.dateint
|
|
19
|
-
- member.is_jfk_profile.is_jfk_profile
|
|
20
|
-
columns:
|
|
21
|
-
- name: users.yshang.member.total_missing_covariates
|
|
22
|
-
type: int
|
|
23
|
-
display_name: Total Missing Covariates
|
|
24
|
-
description: null
|
|
25
|
-
attributes: []
|
|
26
|
-
partition: null
|
|
27
|
-
- name: users.yshang.member.overall_streaming_lift
|
|
28
|
-
type: float
|
|
29
|
-
display_name: Overall Streaming Lift
|
|
30
|
-
description: null
|
|
31
|
-
attributes: []
|
|
32
|
-
partition: null
|
|
33
|
-
- name: users.yshang.member.engagement_quality_score
|
|
34
|
-
type: double
|
|
35
|
-
display_name: Engagement Quality Score
|
|
36
|
-
description: null
|
|
37
|
-
attributes: []
|
|
38
|
-
partition: null
|
|
39
|
-
- name: users.yshang.member.qpd_normalization__35
|
|
40
|
-
type: float
|
|
41
|
-
display_name: QPD (normalization = 35)
|
|
42
|
-
description: null
|
|
43
|
-
attributes: []
|
|
44
|
-
partition: null
|
|
45
|
-
- name: common.dimensions.client_category.client_name
|
|
46
|
-
type: string
|
|
47
|
-
display_name: Client Name
|
|
48
|
-
description: null
|
|
49
|
-
attributes:
|
|
50
|
-
- primary_key
|
|
51
|
-
partition: null
|
|
52
|
-
- name: common.dimensions.hardware_category.hw_category
|
|
53
|
-
type: string
|
|
54
|
-
display_name: Hw Category
|
|
55
|
-
description: null
|
|
56
|
-
attributes:
|
|
57
|
-
- primary_key
|
|
58
|
-
partition: null
|
|
59
|
-
- name: common.dimensions.xp.ab_test_plan.group_id
|
|
60
|
-
type: string
|
|
61
|
-
display_name: Allocation Plan ID
|
|
62
|
-
description: null
|
|
63
|
-
attributes:
|
|
64
|
-
- primary_key
|
|
65
|
-
partition: null
|
|
66
|
-
- name: common.dimensions.xp.allocation_day.alloc_country_iso_code
|
|
67
|
-
type: string
|
|
68
|
-
display_name: Alloc Country Iso Code
|
|
69
|
-
description: null
|
|
70
|
-
attributes: []
|
|
71
|
-
partition: null
|
|
72
|
-
- name: common.dimensions.xp.measure_date.dateint
|
|
73
|
-
type: int
|
|
74
|
-
display_name: Dateint
|
|
75
|
-
description: null
|
|
76
|
-
attributes:
|
|
77
|
-
- primary_key
|
|
78
|
-
- temporal
|
|
79
|
-
partition: null
|
|
80
|
-
- name: member.is_jfk_profile.is_jfk_profile
|
|
81
|
-
type: int
|
|
82
|
-
display_name: Is Jfk Profile
|
|
83
|
-
description: null
|
|
84
|
-
attributes:
|
|
85
|
-
- primary_key
|
|
86
|
-
partition: null
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
name: ${prefix}draft_ms_with_qpd
|
|
2
|
-
node_type: cube
|
|
3
|
-
owners:
|
|
4
|
-
- yshang@netflix.com
|
|
5
|
-
display_name: draft MS with QPD
|
|
6
|
-
description: ''
|
|
7
|
-
mode: published
|
|
8
|
-
metrics:
|
|
9
|
-
- ${prefix}total_missing_covariates
|
|
10
|
-
- ${prefix}overall_streaming_lift
|
|
11
|
-
- ${prefix}qpd
|
|
12
|
-
- ${prefix}engagement_quality_score
|
|
13
|
-
- ${prefix}qpd_normalization__35
|
|
14
|
-
dimensions:
|
|
15
|
-
- common.dimensions.xp.measure_date.dateint
|
|
16
|
-
- member.is_jfk_profile.is_jfk_profile
|
|
17
|
-
- common.dimensions.hardware_category.hw_category
|
|
18
|
-
- common.dimensions.client_category.client_name
|
|
19
|
-
columns:
|
|
20
|
-
- name: users.yshang.member.total_missing_covariates
|
|
21
|
-
type: int
|
|
22
|
-
display_name: Total Missing Covariates
|
|
23
|
-
description: null
|
|
24
|
-
attributes: []
|
|
25
|
-
partition: null
|
|
26
|
-
- name: users.yshang.member.overall_streaming_lift
|
|
27
|
-
type: float
|
|
28
|
-
display_name: Overall Streaming Lift
|
|
29
|
-
description: null
|
|
30
|
-
attributes: []
|
|
31
|
-
partition: null
|
|
32
|
-
- name: users.yshang.member.qpd
|
|
33
|
-
type: float
|
|
34
|
-
display_name: Video QPD per 28d
|
|
35
|
-
description: null
|
|
36
|
-
attributes: []
|
|
37
|
-
partition: null
|
|
38
|
-
- name: users.yshang.member.engagement_quality_score
|
|
39
|
-
type: double
|
|
40
|
-
display_name: Engagement Quality Score
|
|
41
|
-
description: null
|
|
42
|
-
attributes: []
|
|
43
|
-
partition: null
|
|
44
|
-
- name: users.yshang.member.qpd_normalization__35
|
|
45
|
-
type: float
|
|
46
|
-
display_name: QPD (normalization = 35)
|
|
47
|
-
description: null
|
|
48
|
-
attributes: []
|
|
49
|
-
partition: null
|
|
50
|
-
- name: common.dimensions.xp.measure_date.dateint
|
|
51
|
-
type: int
|
|
52
|
-
display_name: Dateint
|
|
53
|
-
description: null
|
|
54
|
-
attributes:
|
|
55
|
-
- temporal
|
|
56
|
-
- primary_key
|
|
57
|
-
partition: null
|
|
58
|
-
- name: member.is_jfk_profile.is_jfk_profile
|
|
59
|
-
type: int
|
|
60
|
-
display_name: Is Jfk Profile
|
|
61
|
-
description: null
|
|
62
|
-
attributes:
|
|
63
|
-
- primary_key
|
|
64
|
-
partition: null
|
|
65
|
-
- name: common.dimensions.hardware_category.hw_category
|
|
66
|
-
type: string
|
|
67
|
-
display_name: Hw Category
|
|
68
|
-
description: null
|
|
69
|
-
attributes:
|
|
70
|
-
- primary_key
|
|
71
|
-
partition: null
|
|
72
|
-
- name: common.dimensions.client_category.client_name
|
|
73
|
-
type: string
|
|
74
|
-
display_name: Client Name
|
|
75
|
-
description: null
|
|
76
|
-
attributes:
|
|
77
|
-
- primary_key
|
|
78
|
-
partition: null
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
name: ${prefix}engagement_quality_score
|
|
2
|
-
node_type: metric
|
|
3
|
-
owners:
|
|
4
|
-
- yshang@netflix.com
|
|
5
|
-
display_name: Engagement Quality Score
|
|
6
|
-
description: ''
|
|
7
|
-
mode: published
|
|
8
|
-
query: |-
|
|
9
|
-
SELECT CAST(SUM(CASE WHEN wsum_eqs_v3_score_pts IS NOT NULL THEN wsum_eqs_v3_score_pts ELSE NULL END) AS DOUBLE) /
|
|
10
|
-
SUM(CASE WHEN wsum_eqs_v3_score_pts IS NOT NULL THEN eqs_view_secs ELSE NULL END) FROM ${prefix}playbacks
|
|
11
|
-
direction: higher_is_better
|
|
12
|
-
significant_digits: 3
|