datajunction 0.0.2.dev1__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.dev1 → datajunction-0.0.2.dev4}/PKG-INFO +1 -1
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/__about__.py +1 -1
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/cli.py +10 -17
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/deployment.py +17 -6
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_cli.py +10 -33
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_compile.py +6 -6
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_deploy.py +18 -4
- datajunction-0.0.2.dev1/Makefile +0 -13
- datajunction-0.0.2.dev1/target/dj.yaml +0 -3
- datajunction-0.0.2.dev1/target/draft_ms.yaml +0 -86
- datajunction-0.0.2.dev1/target/draft_ms_with_qpd.yaml +0 -78
- datajunction-0.0.2.dev1/target/engagement_quality_score.yaml +0 -12
- datajunction-0.0.2.dev1/target/overall_streaming_lift.yaml +0 -8
- datajunction-0.0.2.dev1/target/playbacks.yaml +0 -123
- datajunction-0.0.2.dev1/target/qpd.yaml +0 -16
- datajunction-0.0.2.dev1/target/qpd_normalization__35.yaml +0 -13
- datajunction-0.0.2.dev1/target/total_missing_covariates.yaml +0 -19
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/.coveragerc +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/.gitignore +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/.isort.cfg +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/.pre-commit-config.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/LICENSE.txt +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/README.md +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/__init__.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/_base.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/_internal.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/admin.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/builder.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/client.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/compile.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/exceptions.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/models.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/nodes.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/init_system_nodes.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/date.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/dimension_link.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/is_active.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/materialization.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/node_type.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/node_without_description.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/nodes.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/number_of_materializations.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/number_of_nodes.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/seed/nodes/user.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/datajunction/tags.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/pdm.lock +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/pyproject.toml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/setup.cfg +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/__init__.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/conftest.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/companies.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/companies_dim.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/contractor.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/contractors.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/us_state.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/deploy0/roads/us_states.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/date.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/dispatchers.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/hard_hats.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_orders.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/repair_type.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/us_region.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project1/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project10/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/date.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/dispatchers.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/hard_hats.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/municipality_type.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_orders.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/repair_type.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/us_region.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project11/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/companies.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project12/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project2/.ipynb_checkpoints/some_node.source-checkpoint.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project2/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project2/some_node.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project3/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project3/some_node.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project4/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project4/very/very/deeply/nested/namespace/some_node.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project5/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project5/some_node.a.b.c.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project6/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project6/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project6/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project7/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project7/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project7/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project8/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/dj.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/companies.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples/project9/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/examples.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test__internal.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_admin.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_base.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_builder.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_client.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_generated_client.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_integration.py +0 -0
- {datajunction-0.0.2.dev1 → datajunction-0.0.2.dev4}/tests/test_models.py +0 -0
- {datajunction-0.0.2.dev1 → 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(
|
|
@@ -61,6 +61,8 @@ def test_build_table_has_expected_columns():
|
|
|
61
61
|
tbl = DeploymentService.build_table(
|
|
62
62
|
"abc-123",
|
|
63
63
|
{
|
|
64
|
+
"namespace": "some.namespace",
|
|
65
|
+
"status": "success",
|
|
64
66
|
"results": [
|
|
65
67
|
{
|
|
66
68
|
"deploy_type": "node",
|
|
@@ -75,7 +77,13 @@ def test_build_table_has_expected_columns():
|
|
|
75
77
|
cols = [c.header for c in tbl.columns]
|
|
76
78
|
assert cols == ["Type", "Name", "Operation", "Status", "Message"]
|
|
77
79
|
row_values = [col._cells[0] for col in tbl.columns]
|
|
78
|
-
assert row_values == [
|
|
80
|
+
assert row_values == [
|
|
81
|
+
"node",
|
|
82
|
+
"some.random.node",
|
|
83
|
+
"create",
|
|
84
|
+
"[bold green]success[/bold green]",
|
|
85
|
+
"[gray]ok[/gray]",
|
|
86
|
+
]
|
|
79
87
|
|
|
80
88
|
|
|
81
89
|
def test_reconstruct_deployment_spec(tmp_path):
|
|
@@ -104,8 +112,8 @@ def test_push_waits_until_success(monkeypatch, tmp_path):
|
|
|
104
112
|
# Fake client that returns "pending" once then "success"
|
|
105
113
|
client = MagicMock()
|
|
106
114
|
responses = [
|
|
107
|
-
{"uuid": "123", "status": "pending", "results": []},
|
|
108
|
-
{"uuid": "123", "status": "success", "results": []},
|
|
115
|
+
{"uuid": "123", "status": "pending", "results": [], "namespace": "foo"},
|
|
116
|
+
{"uuid": "123", "status": "success", "results": [], "namespace": "foo"},
|
|
109
117
|
]
|
|
110
118
|
client.deploy.return_value = responses[0]
|
|
111
119
|
client.check_deployment.side_effect = responses[1:]
|
|
@@ -126,11 +134,17 @@ def test_push_times_out(monkeypatch, tmp_path):
|
|
|
126
134
|
|
|
127
135
|
# Fake client: deploy returns a uuid, check_deployment always 'pending'
|
|
128
136
|
client = MagicMock()
|
|
129
|
-
client.deploy.return_value = {
|
|
137
|
+
client.deploy.return_value = {
|
|
138
|
+
"uuid": "123",
|
|
139
|
+
"status": "pending",
|
|
140
|
+
"results": [],
|
|
141
|
+
"namespace": "foo",
|
|
142
|
+
}
|
|
130
143
|
client.check_deployment.return_value = {
|
|
131
144
|
"uuid": "123",
|
|
132
145
|
"status": "pending",
|
|
133
146
|
"results": [],
|
|
147
|
+
"namespace": "foo",
|
|
134
148
|
}
|
|
135
149
|
|
|
136
150
|
svc = DeploymentService(client, console=Console(file=io.StringIO()))
|
datajunction-0.0.2.dev1/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
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
name: ${prefix}playbacks
|
|
2
|
-
node_type: transform
|
|
3
|
-
owners:
|
|
4
|
-
- yshang@netflix.com
|
|
5
|
-
display_name: playbacks
|
|
6
|
-
description: ''
|
|
7
|
-
mode: published
|
|
8
|
-
columns:
|
|
9
|
-
- name: account_id
|
|
10
|
-
type: bigint
|
|
11
|
-
display_name: Account Id
|
|
12
|
-
description: null
|
|
13
|
-
attributes: []
|
|
14
|
-
partition: null
|
|
15
|
-
- name: playback_start_utc_epoch_ms_ts
|
|
16
|
-
type: bigint
|
|
17
|
-
display_name: Playback Start Utc Epoch Ms Ts
|
|
18
|
-
description: null
|
|
19
|
-
attributes: []
|
|
20
|
-
partition: null
|
|
21
|
-
- name: playback_start_utc_date
|
|
22
|
-
type: int
|
|
23
|
-
display_name: Playback Start Utc Date
|
|
24
|
-
description: null
|
|
25
|
-
attributes: []
|
|
26
|
-
partition: null
|
|
27
|
-
- name: view_secs
|
|
28
|
-
type: int
|
|
29
|
-
display_name: View Secs
|
|
30
|
-
description: null
|
|
31
|
-
attributes: []
|
|
32
|
-
partition: null
|
|
33
|
-
- name: is_jfk_profile
|
|
34
|
-
type: int
|
|
35
|
-
display_name: Is Jfk Profile
|
|
36
|
-
description: null
|
|
37
|
-
attributes: []
|
|
38
|
-
partition: null
|
|
39
|
-
- name: wsum_eqs_v3_score_pts
|
|
40
|
-
type: double
|
|
41
|
-
display_name: Wsum Eqs V3 Score Pts
|
|
42
|
-
description: null
|
|
43
|
-
attributes:
|
|
44
|
-
- dimension
|
|
45
|
-
partition: null
|
|
46
|
-
- name: eqs_view_secs
|
|
47
|
-
type: int
|
|
48
|
-
display_name: Eqs View Secs
|
|
49
|
-
description: null
|
|
50
|
-
attributes: []
|
|
51
|
-
partition: null
|
|
52
|
-
- name: play_hw_category
|
|
53
|
-
type: string
|
|
54
|
-
display_name: Play Hw Category
|
|
55
|
-
description: null
|
|
56
|
-
attributes: []
|
|
57
|
-
partition: null
|
|
58
|
-
- name: play_client_name
|
|
59
|
-
type: string
|
|
60
|
-
display_name: Play Client Name
|
|
61
|
-
description: null
|
|
62
|
-
attributes: []
|
|
63
|
-
partition: null
|
|
64
|
-
dimension_links:
|
|
65
|
-
- type: join
|
|
66
|
-
role: null
|
|
67
|
-
dimension_node: common.dimensions.xp.measure_date
|
|
68
|
-
node_column: null
|
|
69
|
-
join_type: left
|
|
70
|
-
join_on: ${prefix}playbacks.playback_start_utc_date = common.dimensions.xp.measure_date.dateint
|
|
71
|
-
- type: join
|
|
72
|
-
role: null
|
|
73
|
-
dimension_node: common.dimensions.client_category
|
|
74
|
-
node_column: null
|
|
75
|
-
join_type: left
|
|
76
|
-
join_on: ${prefix}playbacks.play_client_name = common.dimensions.client_category.client_name
|
|
77
|
-
- type: join
|
|
78
|
-
role: null
|
|
79
|
-
dimension_node: common.dimensions.hardware_category
|
|
80
|
-
node_column: null
|
|
81
|
-
join_type: left
|
|
82
|
-
join_on: ${prefix}playbacks.play_hw_category = common.dimensions.hardware_category.hw_category
|
|
83
|
-
- type: join
|
|
84
|
-
role: null
|
|
85
|
-
dimension_node: member.is_jfk_profile
|
|
86
|
-
node_column: null
|
|
87
|
-
join_type: left
|
|
88
|
-
join_on: ${prefix}playbacks.is_jfk_profile = member.is_jfk_profile.is_jfk_profile
|
|
89
|
-
- type: join
|
|
90
|
-
role: null
|
|
91
|
-
dimension_node: common.dimensions.xp.allocation_day
|
|
92
|
-
node_column: null
|
|
93
|
-
join_type: right
|
|
94
|
-
join_on: |-
|
|
95
|
-
${prefix}playbacks.account_id = common.dimensions.xp.allocation_day.account_id
|
|
96
|
-
AND FLOOR(
|
|
97
|
-
(
|
|
98
|
-
NF_TO_UNIXTIME_MS(${prefix}playbacks.playback_start_utc_epoch_ms_ts)
|
|
99
|
-
- common.dimensions.xp.allocation_day.alloc_utc_ms_ts
|
|
100
|
-
) / 86400000.0
|
|
101
|
-
)
|
|
102
|
-
= common.dimensions.xp.allocation_day.days_since_allocation
|
|
103
|
-
query: |-
|
|
104
|
-
SELECT
|
|
105
|
-
account_id,
|
|
106
|
-
playback_start_utc_epoch_ms_ts,
|
|
107
|
-
playback_start_utc_date,
|
|
108
|
-
view_secs,
|
|
109
|
-
is_jfk_profile,
|
|
110
|
-
IF(
|
|
111
|
-
view_secs > 0 AND eqs_v3_score_pts IS NOT NULL AND is_supplemental_playback = 0,
|
|
112
|
-
view_secs * eqs_v3_score_pts,
|
|
113
|
-
NULL
|
|
114
|
-
) AS wsum_eqs_v3_score_pts,
|
|
115
|
-
IF(
|
|
116
|
-
eqs_v3_score_pts IS NOT NULL,
|
|
117
|
-
view_secs,
|
|
118
|
-
NULL
|
|
119
|
-
) AS eqs_view_secs,
|
|
120
|
-
play_hw_category,
|
|
121
|
-
play_client_name
|
|
122
|
-
FROM source.prodhive.exp_data.playback_allocation_core_w_eqs_f F
|
|
123
|
-
-- WHERE test_cell_nbr_map[:`common.dimensions.xp.ab_test.test_id`] IS NOT NULL
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
name: ${prefix}qpd
|
|
2
|
-
node_type: metric
|
|
3
|
-
owners:
|
|
4
|
-
- yshang@netflix.com
|
|
5
|
-
display_name: Video QPD per 28d
|
|
6
|
-
description: Video Qualified Play Days (VQPD). Qualified Play Days, formerly known
|
|
7
|
-
as Days with a Qualified Play (DWAQP), is defined as the number of days per 28 days
|
|
8
|
-
within the test period that have at least one play of greater than or equal to 6
|
|
9
|
-
minutes. QPD is the engagement metric we have historically found to be most predictive
|
|
10
|
-
of retention. For more details on the related research, see [here](https://docs.google.com/document/d/1qIm2BVC_uvcUvqBl4Xfwfkz5WxNKp5alzDbeDE3dTJA/edit).
|
|
11
|
-
mode: published
|
|
12
|
-
query: |-
|
|
13
|
-
SELECT 28.0 * COUNT( DISTINCT CASE
|
|
14
|
-
WHEN view_secs >= 360 THEN common.dimensions.xp.allocation_day.days_since_allocation
|
|
15
|
-
ELSE NULL
|
|
16
|
-
END) / MAX(common.dimensions.xp.allocation_day.account_observation_day) FROM ${prefix}playbacks
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
name: ${prefix}qpd_normalization__35
|
|
2
|
-
node_type: metric
|
|
3
|
-
owners:
|
|
4
|
-
- yshang@netflix.com
|
|
5
|
-
display_name: QPD (normalization = 35)
|
|
6
|
-
description: ''
|
|
7
|
-
mode: published
|
|
8
|
-
query: |-
|
|
9
|
-
SELECT 28.0 * COUNT( DISTINCT CASE
|
|
10
|
-
WHEN view_secs >= 360 THEN common.dimensions.xp.allocation_day.days_since_allocation
|
|
11
|
-
ELSE NULL
|
|
12
|
-
END) / 35.0
|
|
13
|
-
FROM ${prefix}playbacks
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: ${prefix}total_missing_covariates
|
|
2
|
-
node_type: metric
|
|
3
|
-
owners:
|
|
4
|
-
- yshang@netflix.com
|
|
5
|
-
display_name: Total Missing Covariates
|
|
6
|
-
description: ''
|
|
7
|
-
mode: published
|
|
8
|
-
query: |-
|
|
9
|
-
SELECT MAX(
|
|
10
|
-
CAST(
|
|
11
|
-
CASE
|
|
12
|
-
WHEN common.dimensions.xp.allocation_day.alloc_country_iso_code IS NULL
|
|
13
|
-
OR common.dimensions.xp.allocation_day.alloc_group_id IS NULL
|
|
14
|
-
THEN 1
|
|
15
|
-
ELSE 0
|
|
16
|
-
END
|
|
17
|
-
AS INT
|
|
18
|
-
)
|
|
19
|
-
) FROM ${prefix}playbacks
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|