acryl-datahub 0.15.0rc22__py3-none-any.whl → 0.15.0rc24__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.

Potentially problematic release.


This version of acryl-datahub might be problematic. Click here for more details.

@@ -89,7 +89,16 @@ class PulsarSchema:
89
89
  logger.error(f"Invalid JSON schema: {schema_data}. Error: {str(e)}")
90
90
  avro_schema = {}
91
91
 
92
- self.schema_name = avro_schema.get("namespace") + "." + avro_schema.get("name")
92
+ self.schema_name = "null"
93
+ if avro_schema.get("namespace") and avro_schema.get("name"):
94
+ self.schema_name = (
95
+ avro_schema.get("namespace") + "." + avro_schema.get("name")
96
+ )
97
+ elif avro_schema.get("namespace"):
98
+ self.schema_name = avro_schema.get("namespace")
99
+ elif avro_schema.get("name"):
100
+ self.schema_name = avro_schema.get("name")
101
+
93
102
  self.schema_description = avro_schema.get("doc")
94
103
  self.schema_type = schema.get("type")
95
104
  self.schema_str = schema.get("data")
@@ -414,9 +414,13 @@ class SnowflakeLineageExtractor(SnowflakeCommonMixin, Closeable):
414
414
  except Exception as e:
415
415
  self.report.num_upstream_lineage_edge_parsing_failed += 1
416
416
  upstream_tables = db_row.get("UPSTREAM_TABLES")
417
+ downstream_table = db_row.get("DOWNSTREAM_TABLE_NAME")
417
418
  self.structured_reporter.warning(
418
419
  "Failed to parse lineage edge",
419
- context=f"Upstreams: {upstream_tables} Downstreams: {db_row.get('DOWNSTREAM_TABLE_NAME')}",
420
+ # Tricky: sometimes the full row data is too large, and so the context
421
+ # message gets truncated. By pulling out the upstreams and downstream
422
+ # list, we can at least get the important fields if truncation does occur.
423
+ context=f"Upstreams: {upstream_tables} Downstream: {downstream_table} Full row: {db_row}",
420
424
  exc=e,
421
425
  )
422
426
  return None