mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-21 07:38:13 +00:00
fix(ingest): fix issue in glue tests (#7185)
This commit is contained in:
parent
670342ab64
commit
db1a0f13f3
@ -5,8 +5,15 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "containerProperties",
|
||||
"aspect": {
|
||||
"value": "{\"customProperties\": {\"platform\": \"glue\", \"instance\": \"PROD\", \"database\": \"test-database\"}, \"name\": \"test-database\", \"qualifiedName\": \"arn:aws:glue:eu-east-1:123412341234:database/test-database\"}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"customProperties": {
|
||||
"platform": "glue",
|
||||
"instance": "PROD",
|
||||
"database": "test-database"
|
||||
},
|
||||
"name": "test-database",
|
||||
"qualifiedName": "arn:aws:glue:eu-east-1:123412341234:database/test-database"
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -19,8 +26,9 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "status",
|
||||
"aspect": {
|
||||
"value": "{\"removed\": false}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"removed": false
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -33,8 +41,9 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "dataPlatformInstance",
|
||||
"aspect": {
|
||||
"value": "{\"platform\": \"urn:li:dataPlatform:glue\"}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"platform": "urn:li:dataPlatform:glue"
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -47,8 +56,11 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "subTypes",
|
||||
"aspect": {
|
||||
"value": "{\"typeNames\": [\"Database\"]}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"typeNames": [
|
||||
"Database"
|
||||
]
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -212,8 +224,11 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "subTypes",
|
||||
"aspect": {
|
||||
"value": "{\"typeNames\": [\"table\"]}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"typeNames": [
|
||||
"table"
|
||||
]
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -226,8 +241,9 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "container",
|
||||
"aspect": {
|
||||
"value": "{\"container\": \"urn:li:container:bdf4342ea6899d162eae685bfe9074a7\"}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"container": "urn:li:container:bdf4342ea6899d162eae685bfe9074a7"
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -392,8 +408,11 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "subTypes",
|
||||
"aspect": {
|
||||
"value": "{\"typeNames\": [\"table\"]}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"typeNames": [
|
||||
"table"
|
||||
]
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -406,8 +425,24 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "container",
|
||||
"aspect": {
|
||||
"value": "{\"container\": \"urn:li:container:bdf4342ea6899d162eae685bfe9074a7\"}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"container": "urn:li:container:bdf4342ea6899d162eae685bfe9074a7"
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
"runId": "glue-2020_04_14-07_00_00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"entityType": "container",
|
||||
"entityUrn": "urn:li:container:0b9f1f731ecf6743be6207fec3dc9cba",
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "status",
|
||||
"aspect": {
|
||||
"json": {
|
||||
"removed": true
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
@ -420,8 +455,9 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "status",
|
||||
"aspect": {
|
||||
"value": "{\"removed\": true}",
|
||||
"contentType": "application/json"
|
||||
"json": {
|
||||
"removed": true
|
||||
}
|
||||
},
|
||||
"systemMetadata": {
|
||||
"lastObserved": 1586847600000,
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -324,14 +324,10 @@ def test_glue_stateful(pytestconfig, tmp_path, mock_time, mock_datahub_graph):
|
||||
# part of the second state
|
||||
state1 = cast(BaseSQLAlchemyCheckpointState, checkpoint1.state)
|
||||
state2 = cast(BaseSQLAlchemyCheckpointState, checkpoint2.state)
|
||||
difference_urns = list(
|
||||
difference_urns = set(
|
||||
state1.get_urns_not_in(type="*", other_checkpoint_state=state2)
|
||||
)
|
||||
|
||||
assert len(difference_urns) == 1
|
||||
|
||||
urn1 = (
|
||||
"urn:li:dataset:(urn:li:dataPlatform:glue,flights-database.avro,PROD)"
|
||||
)
|
||||
|
||||
assert urn1 in difference_urns
|
||||
assert difference_urns == {
|
||||
"urn:li:dataset:(urn:li:dataPlatform:glue,flights-database.avro,PROD)",
|
||||
"urn:li:container:0b9f1f731ecf6743be6207fec3dc9cba",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user