wedata-feature-engineering 0.1.10__py3-none-any.whl → 0.1.12__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.10"
6
+ __version__ = "0.1.12"
@@ -178,7 +178,7 @@ class FeatureStoreClient:
178
178
  raise ValueError("FeatureLookup must specify a table_name")
179
179
  # 先校验表名格式是否合法
180
180
  common_utils.validate_table_name(feature.table_name)
181
- # 再构建完整表名
181
+ # 再构建完整表名,并赋值给FeatureLookup对象
182
182
  feature.table_name = common_utils.build_full_table_name(feature.table_name)
183
183
 
184
184
  features = feature_lookups
@@ -323,10 +323,12 @@ class FeatureTableClient:
323
323
  try:
324
324
  # 检查表是否存在
325
325
  if not self._spark.catalog.tableExists(table_name):
326
- raise ValueError(f"Table '{name}' does not exist")
326
+ print(f"Table '{name}' does not exist")
327
+ return
327
328
 
328
329
  # 执行删除
329
330
  self._spark.sql(f"DROP TABLE {table_name}")
331
+ print(f"Table '{name}' dropped")
330
332
 
331
333
  except ValueError as e:
332
334
  raise # 直接抛出已知的ValueError
@@ -361,4 +363,4 @@ class FeatureTableClient:
361
363
  try:
362
364
  return spark_client.get_feature_table(table_name)
363
365
  except Exception as e:
364
- raise ValueError(f"Failed to get metadata for table '{table_name}': {str(e)}") from e
366
+ raise ValueError(f"Failed to get metadata for table '{name}': {str(e)}") from e
@@ -134,7 +134,13 @@ class SparkClient:
134
134
  for row in table_details:
135
135
  if row.col_name == "Table Properties":
136
136
  props = row.data_type[1:-1].split(", ")
137
- table_properties = dict(p.split("=") for p in props if "=" in p)
137
+ table_properties = {}
138
+ for p in props:
139
+ if "=" in p:
140
+ parts = p.split("=", 1)
141
+ key = parts[0].strip()
142
+ value = parts[1].strip() if len(parts) > 1 else ""
143
+ table_properties[key] = value
138
144
 
139
145
  # 获取特征列信息
140
146
  features = self.get_features(table_name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wedata-feature-engineering
3
- Version: 0.1.10
3
+ Version: 0.1.12
4
4
  Summary: Wedata Feature Engineering Library
5
5
  Home-page:
6
6
  Author: meahqian
@@ -1,6 +1,6 @@
1
- wedata/__init__.py,sha256=_M49ivoMq-NogMzHKd9DW6GfjUBWL18mb4gB5dK1Vbw,102
1
+ wedata/__init__.py,sha256=pPGbxhH2t_kptOmcoF2T_erhSzBUj5bL4ciR9l5ek8g,102
2
2
  wedata/feature_store/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- wedata/feature_store/client.py,sha256=DO68yHiaJQ3LmrZ-owWEuRjuwM6vUjcaEdAcF65mdhs,8271
3
+ wedata/feature_store/client.py,sha256=v-ZwhQEMI4bICkYUOW2qbpxYkKjFqVcd0HqM05TkksA,8305
4
4
  wedata/feature_store/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  wedata/feature_store/constants/constants.py,sha256=b4tgcSt66YIq0Fg7pMbqvbqPOI77Cz8znLVZ4ihUKss,1479
6
6
  wedata/feature_store/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,9 +20,9 @@ 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=AoqlXWsR95UgrKuh7QNBUF4ygNmAgTQ_bRsJpmajRmc,11938
23
+ wedata/feature_store/feature_table_client/feature_table_client.py,sha256=U068OAJ93nbojXc0y33O5Q612fULv2CNAbTfMQIGDsE,11989
24
24
  wedata/feature_store/spark_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- wedata/feature_store/spark_client/spark_client.py,sha256=SwMf-TsAeV7_8pDmh4927pKEwwKcIFK3JJ-J8rzUp_Q,10129
25
+ wedata/feature_store/spark_client/spark_client.py,sha256=bDhOjTzXZqOOhr-QQju8CfUbvW5Vc39LYAG3IaQ-0bU,10375
26
26
  wedata/feature_store/training_set_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  wedata/feature_store/training_set_client/training_set_client.py,sha256=CVcdgqfHL2S-fSCkfDwQgqtMhkB8haGEi1kEjbudDOk,15087
28
28
  wedata/feature_store/utils/__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.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,,
40
+ wedata_feature_engineering-0.1.12.dist-info/METADATA,sha256=MQynOFP8WYCWnj5hAgqQPpF2DLoCCCwOwgDT7uwX-qY,645
41
+ wedata_feature_engineering-0.1.12.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
42
+ wedata_feature_engineering-0.1.12.dist-info/top_level.txt,sha256=Xa0v1rh__RvfVTVDirW5r5UBKg7ZO_iuTeXfp8MNo2A,7
43
+ wedata_feature_engineering-0.1.12.dist-info/RECORD,,