File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
metadata-ingestion/src/datahub/ingestion/sink Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -175,18 +175,18 @@ def _write_done_callback(
175
175
:200
176
176
]
177
177
178
+ # Include information about the entity that failed.
179
+ record = record_envelope .record
180
+ if isinstance (record , MetadataChangeProposalWrapper ):
181
+ entity_id = record .entityUrn
182
+ e .info ["id" ] = entity_id
183
+ elif isinstance (record , MetadataChangeEvent ):
184
+ entity_id = record .proposedSnapshot .urn
185
+ e .info ["id" ] = entity_id
186
+
178
187
if not self .treat_errors_as_warnings :
179
188
self .report .report_failure ({"error" : e .message , "info" : e .info })
180
189
else :
181
- record = record_envelope .record
182
- if isinstance (record , MetadataChangeProposalWrapper ):
183
- # include information about the entity that failed
184
- entity_id = cast (
185
- MetadataChangeProposalWrapper , record
186
- ).entityUrn
187
- e .info ["id" ] = entity_id
188
- else :
189
- entity_id = None
190
190
self .report .report_warning ({"warning" : e .message , "info" : e .info })
191
191
write_callback .on_failure (record_envelope , e , e .info )
192
192
else :
You can’t perform that action at this time.
0 commit comments