Skip to content

Commit

Permalink
Fix(ingest/bigquery): fix extracting comments from complex types (#8950)
Browse files Browse the repository at this point in the history
Co-authored-by: Mayuri Nehate <33225191+mayurinehate@users.noreply.github.com>
  • Loading branch information
maaaikoool and mayurinehate authored Oct 27, 2023
1 parent 1ac831f commit cf617d7
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,14 @@ def gen_schema_fields(self, columns: List[BigqueryColumn]) -> List[SchemaField]:
for idx, field in enumerate(schema_fields):
# Remove all the [version=2.0].[type=struct]. tags to get the field path
if (
re.sub(r"\[.*?\]\.", "", field.fieldPath, 0, re.MULTILINE)
== col.field_path
re.sub(
r"\[.*?\]\.",
"",
field.fieldPath.lower(),
0,
re.MULTILINE,
)
== col.field_path.lower()
):
field.description = col.comment
schema_fields[idx] = field
Expand Down

0 comments on commit cf617d7

Please sign in to comment.