prophecy-libs 2.0.0.dev3__tar.gz → 2.0.0.dev5__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.
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/PKG-INFO +1 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/componentruns/component_runs_dao.py +0 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/delta_metrics_storage_initializer.py +1 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/hive_parquet_storage_initializer.py +1 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/metrics_storage_initializer.py +2 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/models.py +2 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/in_memory_store.py +9 -3
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/interims/delta_interims.py +1 -2
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/interims/hive_parquet_interims.py +1 -2
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/interims/interims_table.py +1 -2
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/pipelineruns/pipeline_run_service.py +2 -2
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/pipelineruns/pipeline_runs_dao.py +1 -2
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/initial_python_code.py +36 -13
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/request_processor.py +1 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/utils.py +19 -7
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/PKG-INFO +1 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/setup.py +1 -1
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/README.md +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/config/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/config/config_base.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/config/config_base_test.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/config/utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/componentruns/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/componentruns/component_run_service.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/package.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/execution_metrics_handler.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/interims/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/logging_spark_session.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/models.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/package.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/pipelineruns/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/schemas/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/schemas/em.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/schemas/external.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/common.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/constants.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/external.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/interim_store.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/zip_file.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/jsonrpc/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/jsonrpc/models.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/libs/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/libs/uc_shared_utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/libs/utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/lookups/LookupsBase.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/lookups/LookupsNative.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/lookups/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/random_data_creator.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/streaming/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/streaming/delta_lake_utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/test/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/test/base_test_case.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/test/utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/udfs/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/udfs/rest_api_udf.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/udfs/sample_udf.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/udfs/scala_udf_wrapper.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/constants.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/data_profiler.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/datasampleloader.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/diff.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/__diff.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/_dill.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/_objects.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/_shims.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/detect.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/logger.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/objtypes.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/pointers.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/session.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/settings.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/source.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/dill/temp.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/__main__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/cli.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/config.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/custom_typing.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/decode/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/decode/codes.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/documentor.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/exceptions.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/factory.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/generator.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/address/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/address/en/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/address/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/date_time/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/date_time/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/internet/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/internet/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/misc/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/misc/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/person/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/person/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/phone_number/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/phone_number/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/python/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/python/en_US/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/proxy.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/checksums.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/datasets.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/decorators.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/distribution.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/loading.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/text.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/functions.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/gems_utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/httpclient.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/json_rpc_layer.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/metagem_utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/monitoring_utils.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/pipeline_monitoring.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/secrets.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/synthetic_data_generator.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/__init__.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/abi_base.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/abi_core_fcns.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/abi_fcn_wrapper.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/dataframe_fcns.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/dml_schema.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/fixed_file_schema.py +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/SOURCES.txt +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/dependency_links.txt +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/not-zip-safe +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/requires.txt +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/top_level.txt +0 -0
- {prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/setup.cfg +0 -0
|
@@ -6,6 +6,7 @@ This module handles initialization of Delta Lake tables for storing execution me
|
|
|
6
6
|
|
|
7
7
|
import logging
|
|
8
8
|
|
|
9
|
+
from pyspark.sql import SparkSession
|
|
9
10
|
from pyspark.sql.types import *
|
|
10
11
|
from pyspark.sql.utils import AnalysisException
|
|
11
12
|
|
|
@@ -14,7 +15,6 @@ from prophecy.executionmetrics.evolutions.models import (
|
|
|
14
15
|
MetricsStorageDetails,
|
|
15
16
|
)
|
|
16
17
|
from prophecy.executionmetrics.logging_spark_session import (
|
|
17
|
-
SparkSession,
|
|
18
18
|
sql_with_logging,
|
|
19
19
|
)
|
|
20
20
|
from prophecy.executionmetrics.evolutions.metrics_storage_initializer import (
|
|
@@ -6,6 +6,7 @@ This module handles initialization of Hive tables with Parquet format for storin
|
|
|
6
6
|
|
|
7
7
|
import logging
|
|
8
8
|
|
|
9
|
+
from pyspark.sql import SparkSession
|
|
9
10
|
|
|
10
11
|
from prophecy.executionmetrics.evolutions.models import (
|
|
11
12
|
HiveStorageMetadata,
|
|
@@ -18,7 +19,6 @@ from prophecy.executionmetrics.evolutions.package import (
|
|
|
18
19
|
perform_up_evolutions,
|
|
19
20
|
)
|
|
20
21
|
from prophecy.executionmetrics.logging_spark_session import (
|
|
21
|
-
SparkSession,
|
|
22
22
|
sql_with_logging,
|
|
23
23
|
)
|
|
24
24
|
from prophecy.executionmetrics.evolutions.metrics_storage_initializer import (
|
|
@@ -10,13 +10,14 @@ import re
|
|
|
10
10
|
from abc import ABC, abstractmethod
|
|
11
11
|
from typing import Optional
|
|
12
12
|
|
|
13
|
+
from pyspark.sql import SparkSession
|
|
14
|
+
|
|
13
15
|
from prophecy.executionmetrics.evolutions.models import (
|
|
14
16
|
MetricsStorageDetails,
|
|
15
17
|
MetricsStore,
|
|
16
18
|
StorageMetadata,
|
|
17
19
|
TableMetadata,
|
|
18
20
|
)
|
|
19
|
-
from prophecy.executionmetrics.logging_spark_session import SparkSession
|
|
20
21
|
from prophecy.executionmetrics.schemas.external import MetricsTableNames
|
|
21
22
|
from prophecy.executionmetrics.utils.common import is_databricks_environment
|
|
22
23
|
from prophecy.executionmetrics.utils.external import create_db_suffix_from_url
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/evolutions/models.py
RENAMED
|
@@ -3,7 +3,8 @@ from dataclasses import dataclass
|
|
|
3
3
|
from enum import Enum, auto
|
|
4
4
|
from typing import Any, Optional
|
|
5
5
|
|
|
6
|
-
from
|
|
6
|
+
from pyspark.sql import SparkSession
|
|
7
|
+
|
|
7
8
|
from prophecy.executionmetrics.utils.common import is_databricks_environment
|
|
8
9
|
|
|
9
10
|
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/in_memory_store.py
RENAMED
|
@@ -143,8 +143,7 @@ def extract_slug_to_process_mapping(
|
|
|
143
143
|
return slug_to_process
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
def
|
|
147
|
-
"""Parse workflow graph from dictionary."""
|
|
146
|
+
def _parse_workflow_nodes(data: Dict[str, Any]) -> Dict[str, "WorkflowNode"]:
|
|
148
147
|
processes = {}
|
|
149
148
|
for proc_id, proc_data in data.get("processes", {}).items():
|
|
150
149
|
if proc_data.get("component") == "Subgraph":
|
|
@@ -154,7 +153,7 @@ def _parse_workflow_graph(data: Dict[str, Any]) -> WorkflowGraph:
|
|
|
154
153
|
metadata=proc_data.get("metadata", {}),
|
|
155
154
|
ports=proc_data.get("ports", {}),
|
|
156
155
|
properties=proc_data.get("properties", {}),
|
|
157
|
-
processes=proc_data
|
|
156
|
+
processes=_parse_workflow_nodes(proc_data),
|
|
158
157
|
connections=proc_data.get("connections", []),
|
|
159
158
|
)
|
|
160
159
|
else:
|
|
@@ -167,6 +166,13 @@ def _parse_workflow_graph(data: Dict[str, Any]) -> WorkflowGraph:
|
|
|
167
166
|
)
|
|
168
167
|
processes[proc_id] = node
|
|
169
168
|
|
|
169
|
+
return processes
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def _parse_workflow_graph(data: Dict[str, Any]) -> WorkflowGraph:
|
|
173
|
+
"""Parse workflow graph from dictionary."""
|
|
174
|
+
processes = _parse_workflow_nodes(data)
|
|
175
|
+
|
|
170
176
|
connections = []
|
|
171
177
|
for conn_data in data.get("connections", []):
|
|
172
178
|
connections.append(
|
|
@@ -8,10 +8,9 @@ during pipeline execution.
|
|
|
8
8
|
import logging
|
|
9
9
|
from typing import List, Dict
|
|
10
10
|
|
|
11
|
-
from pyspark.sql import DataFrame
|
|
11
|
+
from pyspark.sql import DataFrame, SparkSession
|
|
12
12
|
|
|
13
13
|
from prophecy.executionmetrics.logging_spark_session import (
|
|
14
|
-
SparkSession,
|
|
15
14
|
sql_with_logging,
|
|
16
15
|
write_to_delta_with_logging,
|
|
17
16
|
)
|
|
@@ -8,14 +8,13 @@ for interim data during pipeline execution.
|
|
|
8
8
|
import logging
|
|
9
9
|
from typing import List, Dict, Optional
|
|
10
10
|
|
|
11
|
-
from pyspark.sql import DataFrame
|
|
11
|
+
from pyspark.sql import DataFrame, SparkSession
|
|
12
12
|
|
|
13
13
|
from prophecy.executionmetrics.evolutions.package import (
|
|
14
14
|
InterimsSchema,
|
|
15
15
|
perform_up_evolutions,
|
|
16
16
|
)
|
|
17
17
|
from prophecy.executionmetrics.logging_spark_session import (
|
|
18
|
-
SparkSession,
|
|
19
18
|
sql_with_logging,
|
|
20
19
|
write_to_hive_with_logging,
|
|
21
20
|
)
|
|
@@ -9,7 +9,7 @@ import logging
|
|
|
9
9
|
from abc import ABC, abstractmethod
|
|
10
10
|
from typing import List, Dict, Optional
|
|
11
11
|
|
|
12
|
-
from pyspark.sql import DataFrame
|
|
12
|
+
from pyspark.sql import DataFrame, SparkSession
|
|
13
13
|
from pyspark.sql.types import StructType, StructField, StringType, TimestampType
|
|
14
14
|
|
|
15
15
|
from prophecy.executionmetrics.evolutions.models import (
|
|
@@ -18,7 +18,6 @@ from prophecy.executionmetrics.evolutions.models import (
|
|
|
18
18
|
StorageMetadata,
|
|
19
19
|
)
|
|
20
20
|
from prophecy.executionmetrics.logging_spark_session import (
|
|
21
|
-
SparkSession,
|
|
22
21
|
refresh_table_if_exists,
|
|
23
22
|
sql_with_logging,
|
|
24
23
|
)
|
|
@@ -14,13 +14,13 @@ from typing import List, Dict, Optional, Tuple, Any
|
|
|
14
14
|
from datetime import datetime
|
|
15
15
|
import uuid
|
|
16
16
|
|
|
17
|
-
from pyspark.sql import DataFrame
|
|
17
|
+
from pyspark.sql import DataFrame, SparkSession
|
|
18
18
|
|
|
19
19
|
from prophecy.executionmetrics.componentruns.component_run_service import (
|
|
20
20
|
ComponentRunService,
|
|
21
21
|
)
|
|
22
22
|
from prophecy.executionmetrics.evolutions.models import StorageMetadata
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
from prophecy.executionmetrics.package import (
|
|
25
25
|
ComponentRuns,
|
|
26
26
|
FileContent,
|
|
@@ -8,7 +8,7 @@ CRUD operations and queries for pipeline execution metrics.
|
|
|
8
8
|
import logging
|
|
9
9
|
from typing import List, Optional
|
|
10
10
|
|
|
11
|
-
from pyspark.sql import DataFrame, Row
|
|
11
|
+
from pyspark.sql import DataFrame, Row, SparkSession
|
|
12
12
|
from pyspark.sql.types import (
|
|
13
13
|
StructType,
|
|
14
14
|
StructField,
|
|
@@ -22,7 +22,6 @@ from pyspark.sql.types import (
|
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
from prophecy.executionmetrics.logging_spark_session import (
|
|
25
|
-
SparkSession,
|
|
26
25
|
refresh_table_if_exists,
|
|
27
26
|
sql_with_logging,
|
|
28
27
|
write_to_delta_with_logging,
|
|
@@ -7,16 +7,15 @@ from functools import wraps
|
|
|
7
7
|
import logging
|
|
8
8
|
import os
|
|
9
9
|
import sys
|
|
10
|
+
import re
|
|
10
11
|
|
|
11
|
-
#
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
print(f"Failed to initialize 'spark' instance. Error: {e}")
|
|
19
|
-
raise Exception("Failed to initialize 'spark' instance")
|
|
12
|
+
# Attempt to initialize it using SparkSessionProxy for serverless
|
|
13
|
+
try:
|
|
14
|
+
from server_rest import SparkSessionProxy
|
|
15
|
+
spark = SparkSessionProxy.get_instance()
|
|
16
|
+
except Exception as e:
|
|
17
|
+
print(f"Failed to initialize 'spark' instance. Error: {e}")
|
|
18
|
+
raise Exception("Failed to initialize 'spark' instance")
|
|
20
19
|
|
|
21
20
|
# Monkey Patch Caching
|
|
22
21
|
try:
|
|
@@ -311,6 +310,7 @@ from pyspark.sql.types import (
|
|
|
311
310
|
DecimalType,
|
|
312
311
|
DoubleType,
|
|
313
312
|
IntegerType,
|
|
313
|
+
StructField,
|
|
314
314
|
)
|
|
315
315
|
from datetime import datetime, date, timedelta
|
|
316
316
|
from decimal import Decimal
|
|
@@ -747,6 +747,26 @@ class DataSampleLoader:
|
|
|
747
747
|
Lightweight replacement for Databricks' built-in ``display`` that returns the
|
|
748
748
|
exact JSON payload your code receives through the DBX Commands API.
|
|
749
749
|
"""
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
def to_ddl(dt: DataType) -> str:
|
|
754
|
+
_valid_ident = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
|
|
755
|
+
def quote_ident(name: str) -> str:
|
|
756
|
+
return name if _valid_ident.fullmatch(name) else f"`{name.replace('`', '``')}`"
|
|
757
|
+
|
|
758
|
+
if isinstance(dt, ArrayType):
|
|
759
|
+
return f"array<{to_ddl(dt.elementType)}>"
|
|
760
|
+
if isinstance(dt, MapType):
|
|
761
|
+
return f"map<{to_ddl(dt.keyType)},{to_ddl(dt.valueType)}>"
|
|
762
|
+
if isinstance(dt, StructType):
|
|
763
|
+
inner = ",".join(
|
|
764
|
+
f"{quote_ident(f.name)}:{to_ddl(f.dataType)}"
|
|
765
|
+
for f in dt.fields
|
|
766
|
+
)
|
|
767
|
+
return f"struct<{inner}>"
|
|
768
|
+
return dt.simpleString()
|
|
769
|
+
|
|
750
770
|
if df is None:
|
|
751
771
|
return
|
|
752
772
|
|
|
@@ -755,8 +775,8 @@ class DataSampleLoader:
|
|
|
755
775
|
schema: list[dict] = [
|
|
756
776
|
{
|
|
757
777
|
"name": field.name,
|
|
758
|
-
"type": json.dumps(field.dataType
|
|
759
|
-
"metadata": json.dumps(field.metadata or {}),
|
|
778
|
+
"type": json.dumps(to_ddl(field.dataType)),
|
|
779
|
+
"metadata": json.dumps(field.metadata or {}),
|
|
760
780
|
}
|
|
761
781
|
for field in df.schema # type: StructField
|
|
762
782
|
]
|
|
@@ -770,11 +790,14 @@ class DataSampleLoader:
|
|
|
770
790
|
OUTPUT_FILE = "/tmp/display_output.json"
|
|
771
791
|
if not Path(OUTPUT_FILE).exists():
|
|
772
792
|
try:
|
|
793
|
+
serialized = cls._json_serialize(display_res)
|
|
794
|
+
if isinstance(serialized, bytes):
|
|
795
|
+
serialized = serialized.decode("utf-8")
|
|
773
796
|
Path(OUTPUT_FILE).write_text(
|
|
774
|
-
|
|
797
|
+
serialized, encoding="utf-8"
|
|
775
798
|
)
|
|
776
799
|
logging.info(
|
|
777
|
-
f"Successfully wrote display_res: {
|
|
800
|
+
f"Successfully wrote display_res: {serialized} to {OUTPUT_FILE}"
|
|
778
801
|
)
|
|
779
802
|
except Exception as e:
|
|
780
803
|
logging.error("Failed to write %s: %s", OUTPUT_FILE, e)
|
|
@@ -76,6 +76,7 @@ async def dispatch_em_request_async(
|
|
|
76
76
|
result = await handler(req) # type: ignore[arg-type]
|
|
77
77
|
return SuccessResponse(id=req_msg.id, result=result) # type: ignore[return-value]
|
|
78
78
|
except Exception as exc: # noqa: BLE001
|
|
79
|
+
logging.info(f"Failed procesing request: {req}, error: {exc}, trace: {traceback.format_exc()}")
|
|
79
80
|
err = JsonRpcError(message=str(exc), trace=traceback.format_exc().splitlines())
|
|
80
81
|
return ErrorResponse(id=req_msg.id, error=err) # type: ignore[return-value]
|
|
81
82
|
|
|
@@ -51,6 +51,17 @@ except ImportError:
|
|
|
51
51
|
from prophecy.libs.utils import *
|
|
52
52
|
from prophecy.utils.pipeline_monitoring import *
|
|
53
53
|
|
|
54
|
+
logger = logging.getLogger(__name__)
|
|
55
|
+
logger.setLevel(logging.INFO)
|
|
56
|
+
|
|
57
|
+
if not logger.hasHandlers():
|
|
58
|
+
handler = logging.StreamHandler()
|
|
59
|
+
handler.setFormatter(
|
|
60
|
+
logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
|
61
|
+
)
|
|
62
|
+
logger.addHandler(handler)
|
|
63
|
+
|
|
64
|
+
|
|
54
65
|
is_serverless = is_serverless_env()
|
|
55
66
|
logger.info(f"is_serverless is {is_serverless}")
|
|
56
67
|
|
|
@@ -444,7 +455,6 @@ class InterimConfig:
|
|
|
444
455
|
self.session = sessionForInteractive
|
|
445
456
|
# It's `JavaClass` when scala-libs are present, and `JavaPackage` when they are not present.
|
|
446
457
|
try:
|
|
447
|
-
return
|
|
448
458
|
if (
|
|
449
459
|
type(spark.sparkContext._jvm.org.apache.spark.sql.InterimOutputHive2)
|
|
450
460
|
== JavaPackage
|
|
@@ -453,11 +463,11 @@ class InterimConfig:
|
|
|
453
463
|
raise Exception(
|
|
454
464
|
"Scala Prophecy Libs jar was not found in the classpath. Please add Scala Prophecy Libs and retry the operation"
|
|
455
465
|
)
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
466
|
+
self.interimOutput = (
|
|
467
|
+
spark.sparkContext._jvm.org.apache.spark.sql.InterimOutputHive2.apply(
|
|
468
|
+
sessionForInteractive
|
|
469
|
+
)
|
|
470
|
+
)
|
|
461
471
|
except PySparkAttributeError as ae: # spark >= 3.4.1
|
|
462
472
|
InterimConfig.jvm_accessible = False
|
|
463
473
|
|
|
@@ -877,7 +887,9 @@ class MetricsCollector:
|
|
|
877
887
|
spark, session_for_interactive, pipeline_id, pipeline_config_opt
|
|
878
888
|
)
|
|
879
889
|
except Exception as e:
|
|
880
|
-
logger.info(
|
|
890
|
+
logger.info(
|
|
891
|
+
f"Failed to start for serverless: {e} -- {traceback.format_exc()}"
|
|
892
|
+
)
|
|
881
893
|
|
|
882
894
|
@classmethod
|
|
883
895
|
def _start_for_serverless(
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="prophecy-libs",
|
|
5
|
-
version="2.0.0.
|
|
5
|
+
version="2.0.0.dev5",
|
|
6
6
|
url="https://github.com/SimpleDataLabsInc/prophecy-python-libs",
|
|
7
7
|
packages=find_packages(exclude=["test.*", "test"]),
|
|
8
8
|
description="Helper library for prophecy generated code",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/interims/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/schemas/__init__.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/schemas/em.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/schemas/external.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/__init__.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/common.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/constants.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/executionmetrics/utils/external.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/streaming/delta_lake_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/decode/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/providers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/__init__.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/checksums.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/datasets.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/decorators.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/faker/utils/distribution.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/synthetic_data_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/abi_core_fcns.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/abi_fcn_wrapper.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/dataframe_fcns.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/dml_schema.py
RENAMED
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy/utils/transpiler/fixed_file_schema.py
RENAMED
|
File without changes
|
|
File without changes
|
{prophecy-libs-2.0.0.dev3 → prophecy-libs-2.0.0.dev5}/prophecy_libs.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|