kacpermuda commented on PR #70816:
URL: https://github.com/apache/airflow/pull/70816#issuecomment-5165886471

   > The third change needs a decision I don't think should be made in passing. 
Copying the input's schema facet onto the output dataset does make Marquez 
render the field nodes, but get_facets_from_bq_table_for_given_fields builds 
those fields as:
   
   > SchemaDatasetFacetFields(name=schema_field.name, 
type=schema_field.field_type, ...)
   field_type is the BigQuery type — STRING, INTEGER, NUMERIC, TIMESTAMP. 
Attaching that to the output dataset advertises BigQuery types for a Postgres, 
MSSQL or MySQL table. The field names carry over correctly, but the types 
describe the wrong system, and any consumer other than Marquez reads them at 
face value.
   
   > So the change buys rendering at the cost of type metadata that is wrong. 
Emitting the fields with names only would be honest and should still give 
Marquez enough to build the nodes — but whether that is the right call, or 
whether approximating with source types is accepted practice, is an OpenLineage 
semantics question rather than a detail of this PR.
   
   > @mobuchowski @kacpermuda — could you weigh in on that last point? 
Specifically: is it acceptable for a transfer operator's output dataset to 
carry the source system's schema facet verbatim, types included, or should the 
types be omitted or mapped when the output is a different backend?
   
   Yes, I agree that we should probably not include BQ types in the output 
schema facet (or translate it to output db types, which can be hard). It's 
better to allow consumer to work some magic here and infer the types from the 
input schema, rather than provide the wrong information as some types may be 
unsupported in given SQL dialect.
   
   Also left one more comment about the schema facet, we can probably fix that 
while we're at it.


-- 
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]

Reply via email to