mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-15 19:03:43 +00:00
fix(ingest): add missing partition keys in schema for glue sources (#3238)
This commit is contained in:
parent
28cbb2b4ef
commit
903348e1db
@ -555,6 +555,23 @@ class GlueSource(Source):
|
|||||||
nullable=True,
|
nullable=True,
|
||||||
)
|
)
|
||||||
fields.append(schema_field)
|
fields.append(schema_field)
|
||||||
|
|
||||||
|
partition_keys = table["PartitionKeys"]
|
||||||
|
for partition_key in partition_keys:
|
||||||
|
schema_field = SchemaField(
|
||||||
|
fieldPath=partition_key["Name"],
|
||||||
|
nativeDataType=partition_key["Type"],
|
||||||
|
type=get_column_type(
|
||||||
|
glue_source,
|
||||||
|
partition_key["Type"],
|
||||||
|
table_name,
|
||||||
|
partition_key["Name"],
|
||||||
|
),
|
||||||
|
recursive=False,
|
||||||
|
nullable=False,
|
||||||
|
)
|
||||||
|
fields.append(schema_field)
|
||||||
|
|
||||||
return SchemaMetadata(
|
return SchemaMetadata(
|
||||||
schemaName=table_name,
|
schemaName=table_name,
|
||||||
version=0,
|
version=0,
|
||||||
|
|||||||
@ -192,6 +192,22 @@
|
|||||||
"globalTags": null,
|
"globalTags": null,
|
||||||
"glossaryTerms": null,
|
"glossaryTerms": null,
|
||||||
"isPartOfKey": false
|
"isPartOfKey": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "year",
|
||||||
|
"jsonPath": null,
|
||||||
|
"nullable": false,
|
||||||
|
"description": null,
|
||||||
|
"type": {
|
||||||
|
"type": {
|
||||||
|
"com.linkedin.pegasus2avro.schema.StringType": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nativeDataType": "string",
|
||||||
|
"recursive": false,
|
||||||
|
"globalTags": null,
|
||||||
|
"glossaryTerms": null,
|
||||||
|
"isPartOfKey": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKeys": null,
|
"primaryKeys": null,
|
||||||
@ -458,6 +474,22 @@
|
|||||||
"globalTags": null,
|
"globalTags": null,
|
||||||
"glossaryTerms": null,
|
"glossaryTerms": null,
|
||||||
"isPartOfKey": false
|
"isPartOfKey": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "year",
|
||||||
|
"jsonPath": null,
|
||||||
|
"nullable": false,
|
||||||
|
"description": null,
|
||||||
|
"type": {
|
||||||
|
"type": {
|
||||||
|
"com.linkedin.pegasus2avro.schema.StringType": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nativeDataType": "string",
|
||||||
|
"recursive": false,
|
||||||
|
"globalTags": null,
|
||||||
|
"glossaryTerms": null,
|
||||||
|
"isPartOfKey": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKeys": null,
|
"primaryKeys": null,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user