kacpermuda commented on code in PR #55573:
URL: https://github.com/apache/airflow/pull/55573#discussion_r2368389507
##########
providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:
##########
@@ -863,6 +867,34 @@ def execute_complete(self, context: Context, event:
dict[str, Any]):
)
return event["pipeline_id"]
+ def get_openlineage_facets_on_complete(self, task_instance) ->
OperatorLineage | None:
+ """Build and return OpenLineage facets and datasets for the completed
pipeline start."""
+ from airflow.providers.common.compat.openlineage.facet import Dataset
+ from airflow.providers.google.cloud.openlineage.facets import
DataFusionRunFacet
+ from airflow.providers.openlineage.extractors import OperatorLineage
+
+ pipeline_resource = (
+ f"projects/{self.project_id}/locations/{self.location}/instances/"
+ f"{self.instance_name}/pipelines/{self.pipeline_name}"
+ )
+
+ inputs = [Dataset(namespace="datafusion", name=pipeline_resource)]
Review Comment:
Let's also modify [OL naming
convention](https://openlineage.io/docs/spec/naming) with whatever we choose
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]