מיפוי OpenLineage

‫Data Lineage API יכול לקבל מידע על שרשרת מקורות נתונים ממערכות שמשולבות עם OpenLineage, תקן פתוח לאיסוף שרשרת מקורות נתונים. כששולחים אירועים בפורמט OpenLineage אל Data Lineage API באמצעות השיטה ProcessOpenLineageRunEvent, ‏ Data Lineage API ממפה מאפיינים מההודעה בפורמט OpenLineage למאפיינים תואמים ב-Data Lineage API.

במאמר הזה מופיעות טבלאות הפניה למיפויים האלה.

מיפוי מאפיינים

ה-method של ProcessOpenLineageRunEvent API בארכיטקטורת REST ממפה מאפייני OpenLineage למאפייני Data Lineage API באופן הבא:

מאפייני Data Lineage API מאפיינים של OpenLineage
Process.name projects/PROJECT_NUMBER/locations/LOCATION/processes/HASH_OF_NAMESPACE_AND_NAME
Process.displayName Job.namespace + ":" + Job.name
‫Process.attributes ‫Job.facets (ראו נתונים מאוחסנים)
‫Run.name projects/PROJECT_NUMBER/locations/LOCATION/processes/HASH_OF_NAMESPACE_AND_NAME/runs/HASH_OF_RUNID
‫Run.displayName Run.runId
‫Run.attributes ‫Run.facets (ראו נתונים מאוחסנים)
‫Run.startTime eventTime
‫Run.endTime eventTime
‫Run.state eventType
‫LineageEvent.name projects/PROJECT_NUMBER/locations/LOCATION/processes/HASH_OF_NAMESPACE_AND_NAME/runs/HASH_OF_RUNID/lineageEvents/HASH_OF_JOB_RUN_INPUT_OUTPUTS_OF_EVENT (לדוגמה, projects/11111111/locations/us/processes/1234/runs/4321/lineageEvents/111-222-333)
‫LineageEvent.EventLinks.source קלט (fqn הוא שרשור של מרחב השמות והשם)
‫LineageEvent.EventLinks.target פלט (fqn הוא שרשור של מרחב השמות והשם)
‫LineageEvent.startTime eventTime
‫LineageEvent.endTime eventTime
requestId מוגדר על ידי המשתמש בשיטה

השירות Managed Service for Apache Spark (שירות מנוהל ל-Apache Spark) תומך בתיעוד של מקורות נתונים ברמת העמודה, בתנאי שהתיעוד נוצר אוטומטית באמצעות האובייקטים outputs עם הפן columnLineage. אירועי OpenLineage מותאמים אישית שכוללים את הפן הזה יוצרים שושלת ברמת הטבלה בלבד, ולא מציגים שושלת ברמת העמודה במסוף Google Cloud . זו דוגמה לפן שנוצר על ידי Managed Service for Apache Spark:

"outputs": [ {
  "namespace": "bigquery",
  "name": "project.dataset.outputtable",
  "columnLineage": {
      "_producer": "https://github.com/OpenLineage/OpenLineage/tree/1.39.0/integration/spark",
      "_schemaURL": "https://openlineage.io/spec/facets/1-2-0/ColumnLineageDatasetFacet.json#/$defs/ColumnLineageDatasetFacet",
      "fields": {
        "output_field": { // This is the name of the output field
          "inputFields": [
            {
              "namespace": "bigquery",
              "name": "project.dataset.inputtable",
              "field": "input_field", // This is the name of the input field
              "transformations": [
                {
                  "type": "DIRECT",
                  "subtype": "IDENTITY",
                  "description": "",
                  "masking": false
                }
              ]
            }
          ]
        }
      },
  }
}]

בדוגמה הזו, יוצרים קישור של שושלת נתונים ברמת העמודה בין input_field לבין output_field. חובה לכלול את שדה הטרנספורמציות. בלעדיו, לא תתבצע הטמעה של שושלת נתונים ברמת העמודה. מידע נוסף על ההגדרה של Open Lineage עבור ההיבט הזה זמין במאמר היבט של קבוצת נתונים ברמת העמודה.

מיפוי FQN

בטבלה הבאה מופיעות דוגמאות לזוגות של שם ומרחב שמות של OpenLineage למערכות שונות, והשמות המלאים (FQN) המקבילים שלהם ב-Knowledge Catalog (לשעבר Dataplex Universal Catalog):

מערכת מרחב השמות של OpenLineage שם OpenLineage שם מלא של Knowledge Catalog
Athena awsathena://athena.{region_name}.amazonaws.com
  • {catalog}
  • {catalog}.{database}
  • {catalog}.{database}.{table}
  • athena:{catalogId}.{region}
  • athena:{catalogId}.{region}.{databaseId}
  • athena:{catalogId}.{region}.{databaseId}.{tableId}
‫AWS Glue arn:aws:glue:{region}:{account id} table/{database name}/{table name} aws_glue:table:{region}.{account id}.{database name}.{table name}
‫Azure Cosmos DB azurecosmos://{host}/dbs/{database} colls/{table}
  • cosmos-db:{host}.{database}
  • cosmos-db:{host}.{database}.{table}
‫Azure Data Explorer azurekusto://{host}.kusto.windows.net {database}/{table}
  • kusto:{host}.{region}.{database}
  • kusto:{host}.{region}.{database}.{table}
Azure Synapse sqlserver://{host}:{port}
  • {database}
  • {database}.{schema}
  • {database}.{schema}.{table}
לא נתמך
BigQuery bigquery
  • {project id}.{dataset name}
  • {project id}.{dataset name}.{table name}
  • bigquery:{projectId}.{datasetId}
  • bigquery:{projectId}.{datasetId}.{assetId}
Cassandra cassandra://{host}:{port}
  • {keyspace}
  • {keyspace}.{table}
  • cassandra:{hostWithPort}.{keyspaceId}
  • cassandra:{hostWithPort}.{keyspaceId}.{tableId}
MySQL mysql://{host}:{port}
  • {database}
  • {database}.{table}
  • mysql:{hostWithPort}.{databaseId}
  • mysql:{hostWithPort}.{databaseId}.{tableId}
CrateDB crate://{host}:{port} {database}.{schema}.{table} לא נתמך
DB2 db2://{host}:{port}
  • {database}
  • {database}.{schema}
  • {database}.{schema}.{table}
  • db2:{dns}.{databaseId}
  • db2:{dns}.{databaseId}.{schemaId}
  • db2:{dns}.{databaseId}.{schemaId}.{tableId}
Hive hive://{host}:{port} {database}.{table} לא נתמך
MSSQL mssql://{host}:{port} {database}.{schema}.{table} לא נתמך
OceanBase oceanbase://{host}:{port} {database}.{table} לא נתמך
Oracle oracle://{host}:{port} {serviceName}.{schema}.{table} or {sid}.{schema}.{table}
  • oracle:{hostWithPort}.{databaseId}
  • oracle:{hostWithPort}.{databaseId}.{schemaId}
  • oracle:{hostWithPort}.{databaseId}.{schemaId}.{tableId}
Postgres postgres://{host}:{port}
  • {database}
  • {database}.{schema}
  • {database}.{schema}.{table}
  • postgresql:{hostWithPort}.{databaseId}
  • postgresql:{hostWithPort}.{databaseId}.{schemaId}
  • postgresql:{hostWithPort}.{databaseId}.{schemaId}.{tableId}
Teradata teradata://{host}:{port} {database}.{table} לא נתמך
Redshift redshift://{cluster_identifier}.{region_name}:{port}
  • {database}
  • {database}.{schema}
  • {database}.{schema}.{table}
  • redshift:{clusterId}.{region}.{port}.{databaseId}
  • redshift:{clusterId}.{region}.{port}.{databaseId}.{schemaId}
  • redshift:{clusterId}.{region}.{port}.{databaseId}.{schemaId}.{tableId}
Snowflake snowflake://{organization name}-{account name} or snowflake://{account-locator}(.{compliance})(.{cloud_region_id})(.{cloud})
  • {database}
  • {database}.{schema}
  • {database}.{schema}.{table}
  • snowflake:{accountName}.{databaseId}
  • snowflake:{accountName}.{databaseId}.{schemaId}
  • snowflake:{accountName}.{databaseId}.{schemaId}.{tableId}
Spanner spanner://{projectId}:{instanceId} {database}.{schema}.{table} נתמך בקטלוג הידע, אבל לא נתמך בתיעוד מקורות הנתונים
Trino trino://{host}:{port}
  • {catalog}
  • {catalog}.{schema}
  • {catalog}.{schema}.{table}
  • trino:{hostWithPort}.{catalogId}
  • trino:{hostWithPort}.{catalogId}.{schemaId}
  • trino:{hostWithPort}.{catalogId}.{schemaId}.{tableId}
‫ABFSS (Azure Data Lake Gen2) abfss://{container name}@{service name}.dfs.core.windows.net {path}
  • abs:{serviceName}.{containerName}
  • abs:{serviceName}.{containerName}.{path}
‫DBFS (מערכת הקבצים של Databricks) dbfs://{workspace name} {path}
  • dbfs:{workspace}
  • dbfs:{workspace}.{path}
Cloud Storage gs://{bucket name} {object key}
  • gcs:{bucketName}
  • gcs:{bucketName}.{virtualPath}
HDFS hdfs://{namenode host}:{namenode port} {path}
  • hdfs:{namenodeHostWithPort}
  • hdfs:{namenodeHostWithPort}.{path}
Kafka kafka://{bootstrap server host}:{port} {topic} kafka:{serverHostWithPort}.{topicId}
מערכת הקבצים המקומית file {path} filesystem:localhost.{path}
מערכת קבצים מרוחקת file://{host} {path} filesystem:{hostWithPort}.{path}
S3 s3://{bucket name} {object key}
  • s3:{bucketName}
  • s3:{bucketName}.{objectKey}
המערכת מקבלת גם את הקידומות למרחב השמות
ו-s3a, וממירה אותן ל-s3ns3
‫WASBS (Azure Blob Storage) wasbs://{container name}@{service name}.dfs.core.windows.net {object key}
  • abs:{serviceName}.{containerName}
  • abs:{serviceName}.{containerName}.{objectKey}
נושא Pub/Sub pubsub topic:{projectId}:{topicId} pubsub:topic:{projectId}.{topicId}
מינוי ל-Pub/Sub pubsub subscription:{projectId}:{subscriptionId} pubsub:subscription:{projectId}.{subscriptionId}

פורמטים קבילים נוספים

למרות ש-OpenLineage לא מגדיר צמדים רגילים של namespace/name למערכות הבאות, Data Lineage API מקבל אירועי שושלת עבורן כשהם מעוצבים כמו שמתואר בטבלה הבאה. משאבים שמפנים אליהם בהודעות OpenLineage עם מרחב השמות custom מפורשים כשמות מותאמים אישית שמוגדרים במלואם.

מערכת מרחב השמות של OpenLineage שם OpenLineage שם מלא של Knowledge Catalog
שם FQN בהתאמה אישית custom {some reference} custom:{someReference}
Dataproc Metastore dataproc_metastore
  • dataproc_metastore:{projectId}.{location}.{instanceId}
  • dataproc_metastore:{projectId}.{location}.{instanceId}.{databaseId}
  • dataproc_metastore:{projectId}.{location}.{instanceId}.{databaseId}.{tableId}
  • dataproc_metastore:{projectId}.{location}.{instanceId}
  • dataproc_metastore:{projectId}.{location}.{instanceId}.{databaseId}
  • dataproc_metastore:{projectId}.{location}.{instanceId}.{databaseId}.{tableId}

המאמרים הבאים