wedata-feature-engineering 0.1.9__py3-none-any.whl → 0.1.10__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.
wedata/__init__.py CHANGED
@@ -3,4 +3,4 @@ WeData Feature Engineering
3
3
  A toolkit for automated feature engineering
4
4
  """
5
5
 
6
- __version__ = "0.1.9"
6
+ __version__ = "0.1.10"
@@ -113,7 +113,7 @@ class FeatureTableClient:
113
113
  try:
114
114
  if self._spark.catalog.tableExists(table_name):
115
115
  raise ValueError(
116
- f"Table '{table_name}' already exists\n"
116
+ f"Table '{name}' already exists\n"
117
117
  "Solutions:\n"
118
118
  "1. Use a different table name\n"
119
119
  "2. Drop the existing table: spark.sql(f'DROP TABLE {name}')\n"
@@ -125,11 +125,6 @@ class FeatureTableClient:
125
125
  table_schema = schema or df.schema
126
126
 
127
127
  # 构建时间戳键属性
128
- timestamp_keys_ddl = []
129
- for timestamp_key in timestamp_keys:
130
- if timestamp_key not in primary_keys:
131
- raise ValueError(f"Timestamp key '{timestamp_key}' must be a primary key")
132
- timestamp_keys_ddl.append(f"`{timestamp_key}` TIMESTAMP")
133
128
 
134
129
  #从环境变量获取额外标签
135
130
  env_tags = {
@@ -142,6 +137,7 @@ class FeatureTableClient:
142
137
  tbl_properties = {
143
138
  "feature_table": "TRUE",
144
139
  "primaryKeys": ",".join(primary_keys),
140
+ "timestampKeys": ",".join(timestamp_keys) if timestamp_keys else "",
145
141
  "comment": description or "",
146
142
  **{f"{k}": v for k, v in (tags or {}).items()},
147
143
  **{f"feature_{k}": v for k, v in (env_tags or {}).items()}
@@ -293,13 +289,13 @@ class FeatureTableClient:
293
289
  try:
294
290
  # 检查表是否存在
295
291
  if not self._spark.catalog.tableExists(table_name):
296
- raise ValueError(f" '{table_name}' 不存在")
292
+ raise ValueError(f"Table '{name}' does not exist")
297
293
 
298
294
  # 读取表数据
299
295
  return self._spark.read.table(table_name)
300
296
 
301
297
  except Exception as e:
302
- raise ValueError(f"读取表 '{table_name}' 失败: {str(e)}") from e
298
+ raise ValueError(f"Failed to read table '{name}': {str(e)}") from e
303
299
 
304
300
  def drop_table(self, name: str):
305
301
 
@@ -327,7 +323,7 @@ class FeatureTableClient:
327
323
  try:
328
324
  # 检查表是否存在
329
325
  if not self._spark.catalog.tableExists(table_name):
330
- raise ValueError(f" '{table_name}' 不存在")
326
+ raise ValueError(f"Table '{name}' does not exist")
331
327
 
332
328
  # 执行删除
333
329
  self._spark.sql(f"DROP TABLE {table_name}")
@@ -335,7 +331,7 @@ class FeatureTableClient:
335
331
  except ValueError as e:
336
332
  raise # 直接抛出已知的ValueError
337
333
  except Exception as e:
338
- raise RuntimeError(f"删除表 '{table_name}' 失败: {str(e)}") from e
334
+ raise RuntimeError(f"Failed to delete table '{name}': {str(e)}") from e
339
335
 
340
336
  def get_table(
341
337
  self,
@@ -365,4 +361,4 @@ class FeatureTableClient:
365
361
  try:
366
362
  return spark_client.get_feature_table(table_name)
367
363
  except Exception as e:
368
- raise ValueError(f"获取表'{table_name}'元数据失败: {str(e)}") from e
364
+ raise ValueError(f"Failed to get metadata for table '{table_name}': {str(e)}") from e
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wedata-feature-engineering
3
- Version: 0.1.9
3
+ Version: 0.1.10
4
4
  Summary: Wedata Feature Engineering Library
5
5
  Home-page:
6
6
  Author: meahqian
@@ -1,4 +1,4 @@
1
- wedata/__init__.py,sha256=QDgjssRv3Fu3e8OTEm5m1qWnkzAdYKW5vMtvkocJCmI,101
1
+ wedata/__init__.py,sha256=_M49ivoMq-NogMzHKd9DW6GfjUBWL18mb4gB5dK1Vbw,102
2
2
  wedata/feature_store/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  wedata/feature_store/client.py,sha256=DO68yHiaJQ3LmrZ-owWEuRjuwM6vUjcaEdAcF65mdhs,8271
4
4
  wedata/feature_store/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,7 +20,7 @@ wedata/feature_store/entities/on_demand_column_info.py,sha256=Eh5ieaj1TxC7DG6ipB
20
20
  wedata/feature_store/entities/source_data_column_info.py,sha256=a9jQOJvehwDIrKPwsP6W9YRBSPNK2nZYypE6-p80CwA,542
21
21
  wedata/feature_store/entities/training_set.py,sha256=ylt1h6Z_xU8hKYvnvd80CeewTGSN68-_kvFpoliwH7s,5679
22
22
  wedata/feature_store/feature_table_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- wedata/feature_store/feature_table_client/feature_table_client.py,sha256=tsVPB3IZIsfGxPd_kQna9b20zY494wuzLofv2j1w-so,12142
23
+ wedata/feature_store/feature_table_client/feature_table_client.py,sha256=AoqlXWsR95UgrKuh7QNBUF4ygNmAgTQ_bRsJpmajRmc,11938
24
24
  wedata/feature_store/spark_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  wedata/feature_store/spark_client/spark_client.py,sha256=SwMf-TsAeV7_8pDmh4927pKEwwKcIFK3JJ-J8rzUp_Q,10129
26
26
  wedata/feature_store/training_set_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -37,7 +37,7 @@ wedata/feature_store/utils/topological_sort.py,sha256=ebzKxmxeCLk9seB1zR0ASCGXsZ
37
37
  wedata/feature_store/utils/training_set_utils.py,sha256=MYsPZS1d9HKswHgjgxD8K7H9N3dWPyyTTx20Mkp4PVU,22497
38
38
  wedata/feature_store/utils/uc_utils.py,sha256=A-W8Cd8yvTmAMEWaHeWmGmcIDMvUtjAfx2G2x_di1QE,10774
39
39
  wedata/feature_store/utils/validation_utils.py,sha256=FslvrNs3kstqvM6THScLOluEE6O9RWlDrD9xiihTzlw,1735
40
- wedata_feature_engineering-0.1.9.dist-info/METADATA,sha256=u_UnAZHKL603djFWLyfvZDIL220cwLEwyjYLjjXKRbw,644
41
- wedata_feature_engineering-0.1.9.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
42
- wedata_feature_engineering-0.1.9.dist-info/top_level.txt,sha256=Xa0v1rh__RvfVTVDirW5r5UBKg7ZO_iuTeXfp8MNo2A,7
43
- wedata_feature_engineering-0.1.9.dist-info/RECORD,,
40
+ wedata_feature_engineering-0.1.10.dist-info/METADATA,sha256=a3hj-GU81Glxtr14wsUdmothFfw5h9vdGYb2PWL5G5A,645
41
+ wedata_feature_engineering-0.1.10.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
42
+ wedata_feature_engineering-0.1.10.dist-info/top_level.txt,sha256=Xa0v1rh__RvfVTVDirW5r5UBKg7ZO_iuTeXfp8MNo2A,7
43
+ wedata_feature_engineering-0.1.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5