tdfs4ds 0.2.4.44__py3-none-any.whl → 0.2.4.46__py3-none-any.whl
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.
- tdfs4ds/__init__.py +1 -1
- tdfs4ds/feature_store/feature_data_processing.py +4 -4
- tdfs4ds/feature_store/feature_store_management.py +1 -1
- tdfs4ds/utils/filter_management.py +19 -2
- {tdfs4ds-0.2.4.44.dist-info → tdfs4ds-0.2.4.46.dist-info}/METADATA +1 -1
- {tdfs4ds-0.2.4.44.dist-info → tdfs4ds-0.2.4.46.dist-info}/RECORD +8 -8
- {tdfs4ds-0.2.4.44.dist-info → tdfs4ds-0.2.4.46.dist-info}/WHEEL +0 -0
- {tdfs4ds-0.2.4.44.dist-info → tdfs4ds-0.2.4.46.dist-info}/top_level.txt +0 -0
tdfs4ds/__init__.py
CHANGED
|
@@ -287,10 +287,10 @@ def prepare_feature_ingestion(df, entity_id, feature_names, feature_versions=Non
|
|
|
287
287
|
# Execute: create volatile table and test unicity
|
|
288
288
|
try:
|
|
289
289
|
tdml.DataFrame.from_query(nested_query).to_sql(
|
|
290
|
-
table_name=volatile_table_name,
|
|
291
|
-
temporary=True,
|
|
292
|
-
primary_index=primary_index.split(','),
|
|
293
|
-
if_exists='replace'
|
|
290
|
+
table_name = volatile_table_name,
|
|
291
|
+
temporary = True,
|
|
292
|
+
primary_index = primary_index.split(','),
|
|
293
|
+
if_exists = 'replace'
|
|
294
294
|
)
|
|
295
295
|
nb_duplicates = tdml.execute_sql(query_test_unicity).fetchall()[0][0]
|
|
296
296
|
if nb_duplicates is not None and nb_duplicates > 0:
|
|
@@ -217,7 +217,7 @@ def feature_store_table_creation(entity_id, feature_type, if_exists='fail', prim
|
|
|
217
217
|
query2 = f"CREATE INDEX (FEATURE_ID) ON {tdfs4ds.SCHEMA}.{table_name};"
|
|
218
218
|
|
|
219
219
|
# SQL query to comment the table indicating the entity id it is related to
|
|
220
|
-
query3 = f"COMMENT ON TABLE {tdfs4ds.SCHEMA}.{table_name} IS '
|
|
220
|
+
query3 = f"COMMENT ON TABLE {tdfs4ds.SCHEMA}.{table_name} IS 'Feature Store Table'"
|
|
221
221
|
|
|
222
222
|
# SQL query to create the view
|
|
223
223
|
query_view = f"""
|
|
@@ -228,11 +228,26 @@ class FilterManager:
|
|
|
228
228
|
primary_index = [self.filter_id_name]
|
|
229
229
|
|
|
230
230
|
logger.debug("Writing hidden table", extra={"primary_index": primary_index})
|
|
231
|
+
data_types = tdfs4ds.utils.info.get_feature_types_sql_format(df_filter)
|
|
232
|
+
query_creation = f"""
|
|
233
|
+
CREATE TABLE {self.schema_name}.{self.table_name} (
|
|
234
|
+
{', '.join([f'"{k}" {v}' for k,v in data_types.items()])}
|
|
235
|
+
) UNIQUE PRIMARY INDEX ({primary_index[0]})
|
|
236
|
+
"""
|
|
237
|
+
|
|
238
|
+
logger.debug("Creating hidden table with SQL:\n%s", query_creation)
|
|
239
|
+
try:
|
|
240
|
+
tdml.execute_sql(f"DROP TABLE {self.schema_name}.{self.table_name}")
|
|
241
|
+
except Exception:
|
|
242
|
+
logger.debug("Hidden table did not exist; proceeding to create.")
|
|
243
|
+
pass # Ignore if table does not exist
|
|
244
|
+
tdml.execute_sql(query_creation)
|
|
245
|
+
logger.debug("Inserting filter data into hidden table")
|
|
246
|
+
|
|
231
247
|
df_filter.to_sql(
|
|
232
248
|
table_name=self.table_name,
|
|
233
249
|
schema_name=self.schema_name,
|
|
234
|
-
if_exists="
|
|
235
|
-
primary_index=primary_index,
|
|
250
|
+
if_exists="append"
|
|
236
251
|
)
|
|
237
252
|
|
|
238
253
|
# Create/replace public view with filter_id = 1
|
|
@@ -246,6 +261,8 @@ class FilterManager:
|
|
|
246
261
|
tdml.execute_sql(view_sql)
|
|
247
262
|
|
|
248
263
|
# Collect stats to help the optimizer
|
|
264
|
+
for col in df_filter.columns:
|
|
265
|
+
tdml.execute_sql(f"COLLECT STATISTICS ON {self.schema_name}.{self.table_name} COLUMN ({col})")
|
|
249
266
|
stats_sql = f"""
|
|
250
267
|
COLLECT STATISTICS USING NO SAMPLE AND NO THRESHOLD
|
|
251
268
|
COLUMN ({self.filter_id_name})
|
|
@@ -2,7 +2,7 @@ tdfs/__init__.py,sha256=7AcO7uB1opRCt7t2JOHworKimfAaDeO3boRW7u9Geo8,23
|
|
|
2
2
|
tdfs/datasets.py,sha256=-b2MPEKGki2V1M8iUcoDR9uc2krIK7u1CK-EhChvihs,985
|
|
3
3
|
tdfs/feature_store.py,sha256=Honu7eOAXxP4Ivz0mRlhuNkfTDzgZl5HB1WlQUwzcZ0,31354
|
|
4
4
|
tdfs/data/curves.csv,sha256=q0Tm-0yu7VMK4lHvHpgi1LMeRq0lO5gJy2Q17brKbEM,112488
|
|
5
|
-
tdfs4ds/__init__.py,sha256=
|
|
5
|
+
tdfs4ds/__init__.py,sha256=TvxBT_6N5-u3u1qFarsTl4Td7DDBUhH_r_E6XAH6kWg,61203
|
|
6
6
|
tdfs4ds/datasets.py,sha256=LE4Gn0muwdyrIrCrbkE92cnafUML63z1lj5bFIIVzmc,3524
|
|
7
7
|
tdfs4ds/feature_engineering.py,sha256=oVnZ2V_XNGE12LKC_fNfkrWSQZLgtYRmaf8Dispi6S4,7081
|
|
8
8
|
tdfs4ds/feature_store.py,sha256=y-oItPZw6nBkBcGAceaATZbkLPTsvpk0OnpzTxYofDs,68576
|
|
@@ -17,22 +17,22 @@ tdfs4ds/dataset/dataset.py,sha256=J_fgfsVdR9zSOXrUOqyotqsUD-GlQMGyuld6ueov45w,76
|
|
|
17
17
|
tdfs4ds/dataset/dataset_catalog.py,sha256=qxS2thDW2MvsRouSFaX1M0sX2J7IzBAYD8Yf22Tsd5k,16638
|
|
18
18
|
tdfs4ds/feature_store/__init__.py,sha256=a7NPCkpTx40UR5LRErwnskpABG2Vuib7F5wUjaUGCnI,209
|
|
19
19
|
tdfs4ds/feature_store/entity_management.py,sha256=9ltytv3yCTG84NZXBpb1Tlkf9pOxvrNb0MVidU4pwvE,10157
|
|
20
|
-
tdfs4ds/feature_store/feature_data_processing.py,sha256=
|
|
20
|
+
tdfs4ds/feature_store/feature_data_processing.py,sha256=IrjoL8Q6jI5QELGxSfXu0G5IeqTEEnNJKEoY9ySZF4k,45039
|
|
21
21
|
tdfs4ds/feature_store/feature_query_retrieval.py,sha256=51c6ZNlLFiBIxNPinS8ot8bjWEIb1QV2eVg69yzVF80,35381
|
|
22
|
-
tdfs4ds/feature_store/feature_store_management.py,sha256=
|
|
22
|
+
tdfs4ds/feature_store/feature_store_management.py,sha256=RZrjjTKjJBmc3wate8A5NsnBsqtY0be18lFx5WdcWy4,52120
|
|
23
23
|
tdfs4ds/process_store/__init__.py,sha256=npHR_xju5ecGmWfYHDyteLwiU3x-cL4HD3sFK_th7xY,229
|
|
24
24
|
tdfs4ds/process_store/process_followup.py,sha256=E4jgQahjhVRBbfAW3JXNLId7H5qV8ozRt-6PyAQuPzg,12583
|
|
25
25
|
tdfs4ds/process_store/process_query_administration.py,sha256=AOufkJ6DFUpBiGm-6Q6Dq0Aovw31UGTscZ3Ya0ewS-0,7851
|
|
26
26
|
tdfs4ds/process_store/process_registration_management.py,sha256=2fFjt4Pmh3An1BUFvRX3xABSlQrlWiEiPQStH3A9Xpk,36130
|
|
27
27
|
tdfs4ds/process_store/process_store_catalog_management.py,sha256=eVUU9uanyXCUkzi2vcHbJPL9qFiXVasnCxPGr-r9EY8,16090
|
|
28
28
|
tdfs4ds/utils/__init__.py,sha256=-yTMfDLZbQnIRQ64s_bczzT21tDW2A8FZeq9PX5SgFU,168
|
|
29
|
-
tdfs4ds/utils/filter_management.py,sha256=
|
|
29
|
+
tdfs4ds/utils/filter_management.py,sha256=zEV3COrxqS_GfE9ogpzKJEfWM_WAnEkTUz8s2OR8JJk,28329
|
|
30
30
|
tdfs4ds/utils/info.py,sha256=sShnUxXMlvCtQ6xtShDhqdpTr6sMG0dZQhNBFgUENDY,12058
|
|
31
31
|
tdfs4ds/utils/lineage.py,sha256=gy5M42qy5fvdWmlohAY3WPYoqAyp5VakeEmeT1YjrJQ,37839
|
|
32
32
|
tdfs4ds/utils/query_management.py,sha256=kWDeTdsYcbpV5Tyhh-8uLRWvXh16nIdXNIJ97w76aNU,4848
|
|
33
33
|
tdfs4ds/utils/time_management.py,sha256=oq_vlMliLuD4hO1G2zwWbj-wv4UzGWhB6-nXIsIyiMk,31935
|
|
34
34
|
tdfs4ds/utils/visualization.py,sha256=5S528KoKzzkrAdCxfy7ecyqKvAXBoibNvHwz_u5ISMs,23167
|
|
35
|
-
tdfs4ds-0.2.4.
|
|
36
|
-
tdfs4ds-0.2.4.
|
|
37
|
-
tdfs4ds-0.2.4.
|
|
38
|
-
tdfs4ds-0.2.4.
|
|
35
|
+
tdfs4ds-0.2.4.46.dist-info/METADATA,sha256=jS_dfp2mmCTy8mDFZb9OhknREDPrW8dAPQROxRGb4rE,14326
|
|
36
|
+
tdfs4ds-0.2.4.46.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
37
|
+
tdfs4ds-0.2.4.46.dist-info/top_level.txt,sha256=wMyVkMvnBn8RRt1xBveGQxOpWFijPMPkMiE7G2mi8zo,8
|
|
38
|
+
tdfs4ds-0.2.4.46.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|