{"id":1603,"library":"openlineage-integration-common","title":"OpenLineage Integration Common Library","description":"The `openlineage-integration-common` library provides shared data models, utilities, and provider interfaces for building OpenLineage integrations in Python. It is a foundational component often used by other OpenLineage libraries (like `openlineage-python`) and custom integrations. The current version is 1.46.0, and it follows a frequent release cadence, often updated alongside the main OpenLineage project.","status":"active","version":"1.46.0","language":"en","source_language":"en","source_url":"https://github.com/OpenLineage/OpenLineage/tree/main/integration/common","tags":["lineage","data-governance","metadata","etl","data-pipeline","integrations"],"install":[{"cmd":"pip install openlineage-integration-common","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for defining data models and schema validation.","package":"pydantic","optional":false},{"reason":"Used for YAML configuration parsing.","package":"PyYAML","optional":false}],"imports":[{"note":"A common model for representing database table schemas.","symbol":"DbTableSchema","correct":"from openlineage.common.models import DbTableSchema"},{"note":"Used for parsing and representing SQL statements within integrations.","symbol":"SQLStatement","correct":"from openlineage.common.provider import SQLStatement"},{"note":"Utility to retrieve common OpenLineage configuration.","symbol":"get_common_config","correct":"from openlineage.common.config import get_common_config"},{"note":"Model for representing data sources.","symbol":"Source","correct":"from openlineage.common.models import Source"}],"quickstart":{"code":"from openlineage.common.models import DbTableSchema, Source\nfrom openlineage.common.provider import SQLStatement\n\n# Example: Defining a database table schema\ndb_table = DbTableSchema(\n    schema='public',\n    table='my_table',\n    fields=[\n        {'name': 'id', 'type': 'int'},\n        {'name': 'name', 'type': 'string'}\n    ]\n)\nprint(f\"Defined DB Table: {db_table.json(indent=2)}\")\n\n# Example: Defining a data source\nmy_source = Source(scheme='postgresql', authority='localhost:5432', connection_url='jdbc:postgresql://localhost:5432/mydb')\nprint(f\"Defined Source: {my_source.json(indent=2)}\")\n\n# Example: Representing a SQL statement (without actual parsing logic)\nsql_statement = SQLStatement(query='SELECT * FROM public.my_table')\nprint(f\"SQL Statement: {sql_statement.json(indent=2)}\")","lang":"python","description":"This quickstart demonstrates how to use fundamental data models like `DbTableSchema`, `Source`, and `SQLStatement` provided by `openlineage-integration-common`. These models are essential building blocks when developing custom OpenLineage integrations or working with parsed metadata."},"warnings":[{"fix":"Upgrade to `openlineage-integration-common` version 1.40.1 or newer to restore `__version__` variables.","message":"Version 1.40.0 experienced a breaking change where `__version__` variables were missing in top-level modules, which could affect tools relying on programmatic version checks.","severity":"breaking","affected_versions":"1.40.0"},{"fix":"For sending OpenLineage events to a collector, use the `openlineage-python` library and its `OpenLineageClient`. `openlineage-python` internally depends on `openlineage-integration-common`.","message":"This library (`openlineage-integration-common`) provides common models and utilities primarily for *building* OpenLineage integrations, or as an internal dependency. It is NOT the primary client library for sending OpenLineage events.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When working with OpenLineage Facets, ensure you are importing from `openlineage.client.facet` (after installing `openlineage-python`), rather than searching exclusively within `openlineage.common`.","message":"Many core OpenLineage 'Facet' definitions (e.g., `SchemaDatasetFacet`, `RunFacet`) are located in the `openlineage.client.facet` module, which is part of the `openlineage-python` package, not directly in `openlineage.common`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}