fabricks 4.0.3__py3-none-any.whl → 4.0.4__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.
fabricks/utils/log.py CHANGED
@@ -62,23 +62,6 @@ class LogFormatter(logging.Formatter):
62
62
  exc_info = record.__dict__.get("exc_info", None)
63
63
  extra += f" [{self.COLORS[logging.ERROR]}{exc_info[0].__name__}{self.RESET}]" # type: ignore
64
64
 
65
- if hasattr(record, "df"):
66
- df = record.__dict__.get("df")
67
- if isinstance(df, DataFrame):
68
- try:
69
- pandas_df = df.toPandas()
70
- except Exception:
71
- # Handle timestamp precision/timezone issues by casting to string
72
- from pyspark.sql.functions import col
73
- from pyspark.sql.types import TimestampType
74
-
75
- for field in df.schema.fields:
76
- if isinstance(field.dataType, TimestampType):
77
- df = df.withColumn(field.name, col(field.name).cast("string"))
78
- pandas_df = df.toPandas()
79
-
80
- extra += f"\n---\n%df\n{pandas_df.to_string(index=True)}\n---"
81
-
82
65
  if hasattr(record, "json"):
83
66
  json_data = record.__dict__.get("json")
84
67
  extra += f"\n---\n{json.dumps(json_data, indent=2, default=str)}\n---"
@@ -173,7 +156,7 @@ class AzureTableLogHandler(logging.Handler):
173
156
  r["Exception"] = json.dumps(d)
174
157
 
175
158
  if hasattr(record, "json"):
176
- r["Data"] = json.dumps(record.__dict__.get("json", ""))
159
+ r["Json"] = json.dumps(record.__dict__.get("json", ""))
177
160
 
178
161
  if self.debugmode:
179
162
  if hasattr(record, "content"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fabricks
3
- Version: 4.0.3
3
+ Version: 4.0.4
4
4
  Author-email: BMS DWH Team <bi_support@bmsuisse.ch>
5
5
  Requires-Python: <4,>=3.9
6
6
  Requires-Dist: azure-data-tables<13,>=12.5.0
@@ -160,7 +160,7 @@ fabricks/utils/azure_queue.py,sha256=wtKAq_MD5QLxelerDO475dzL-SySIrxt9d5KGi-8vvw
160
160
  fabricks/utils/azure_table.py,sha256=J_UAPiCN89rL5FNmwIGg43Z6FSH8evVIWijDEgYJxk4,5294
161
161
  fabricks/utils/console.py,sha256=X4lLgL_UxCjoFRx-ZRCwzdBveRGPKlFYZDi6vl7uevQ,1017
162
162
  fabricks/utils/helpers.py,sha256=2If-5cTO0ZCTgEVHS00Eh7Qv0YBdnZoSM7Rm1BdhhF8,7964
163
- fabricks/utils/log.py,sha256=KGljzsjLdu-HpAV1hsazSi78cnwyRaqnst54apH_foo,8835
163
+ fabricks/utils/log.py,sha256=KaS7haFMWVLERSQrgUBXM5mqJApGYogQZpyy0AA1RsA,8067
164
164
  fabricks/utils/mermaid.py,sha256=XoiVxPaUJS4TC_ybA-e78qFzQkQ46uPf055JiiNDdSg,986
165
165
  fabricks/utils/path.py,sha256=_u_jFUWvlPj5KdT99tWffachVyokFUY8PCeVB1IzClY,11998
166
166
  fabricks/utils/pip.py,sha256=4rNmjy4h2352Lf6EX1qb7PB1qOP6Wm29P8Np6ISqt5w,1594
@@ -174,6 +174,6 @@ fabricks/utils/read/read_yaml.py,sha256=LlStrs1A1hCcgW5gHLEUx5ayC880JTO7EfhjxmtS
174
174
  fabricks/utils/write/__init__.py,sha256=i0UnZenXj9Aq0b0_aU3s6882vg-Vu_AyKfQhl_dTp-g,200
175
175
  fabricks/utils/write/delta.py,sha256=H0fXrrSCgHkZvq88gqtl4xy5Toy31p5fcXQP0VqqSWI,1286
176
176
  fabricks/utils/write/stream.py,sha256=HJxMpWf7Y2Q8dCS1LJzVOO_Tax_Q_YYsvDW69CSpMnw,640
177
- fabricks-4.0.3.dist-info/METADATA,sha256=Xima_GeKVvfKI4bx8ejsPpugzISA-RbyB85Fq4IpvWQ,954
178
- fabricks-4.0.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
179
- fabricks-4.0.3.dist-info/RECORD,,
177
+ fabricks-4.0.4.dist-info/METADATA,sha256=5obV14I0X6wiHysFbKaKl2VgZBCyi8FYp9ow6ENfzv8,954
178
+ fabricks-4.0.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
179
+ fabricks-4.0.4.dist-info/RECORD,,