apache-airflow-providers-openlineage 2.7.2rc1__tar.gz → 2.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/PKG-INFO +14 -14
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/README.rst +6 -6
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/changelog.rst +26 -4
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/guides/user.rst +1 -1
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/index.rst +6 -6
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/provider.yaml +2 -1
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/pyproject.toml +8 -8
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/__init__.py +1 -1
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/plugins/openlineage.py +14 -12
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/sqlparser.py +23 -11
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/utils/utils.py +10 -6
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/operator.py +2 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_execution.py +2 -2
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/test_sqlparser.py +50 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/utils/test_utils.py +64 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/.latest-doc-only-change.txt +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/commits.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/conf.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/configurations-ref.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/guides/developer.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/guides/structure.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/integration-logos/openlineage.svg +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/macros.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/security.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/docs/supported_classes.rst +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/LICENSE +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/conf.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/extractors/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/extractors/base.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/extractors/bash.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/extractors/manager.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/extractors/python.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/facets/AirflowDagRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/facets/AirflowDebugRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/facets/AirflowJobFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/facets/AirflowRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/facets/AirflowStateRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/facets/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/get_provider_info.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/operators/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/operators/empty.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/plugins/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/plugins/adapter.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/plugins/facets.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/plugins/listener.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/plugins/macros.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/utils/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/utils/selective_enable.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/utils/spark.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/utils/sql.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/src/airflow/providers/openlineage/version_compat.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/conftest.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/integration/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/integration/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/integration/openlineage/operators/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/conftest.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_base_complex_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_base_simple_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_defer_simple_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_docs_file_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_mapped_simple_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_asset_or_time_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_cron_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_list_complex_assets_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_list_multiple_assets_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_list_single_asset_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_multiple_assets_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_single_asset_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_schedule_timetable_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_setup_teardown_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_short_circuit_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_task_groups_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_taskflow_simple_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_trigger_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/example_openlineage_versioned_dag.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_base_complex_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_base_complex_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_base_simple_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_base_simple_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_defer_simple_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_docs_file_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_mapped_simple_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_asset_or_time_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_asset_or_time_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_cron_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_cron_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_list_complex_assets_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_list_complex_assets_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_list_multiple_assets_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_list_multiple_assets_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_list_single_asset_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_list_single_asset_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_multiple_assets_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_multiple_assets_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_single_asset_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_single_asset_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_timetable_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_schedule_timetable_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_setup_teardown_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_setup_teardown_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_short_circuit_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_task_groups_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_taskflow_simple_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_trigger_dag.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_versioned_dag__af2.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/expected_events/openlineage_versioned_dag__af3.json +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/transport/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/system/openlineage/transport/variable.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/dags/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/dags/test_openlineage_execution.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/extractors/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/extractors/test_base.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/extractors/test_bash.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/extractors/test_manager.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/extractors/test_python.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/log_config.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/operators/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/operators/test_empty.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/openlineage_configs/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/openlineage_configs/http.yaml +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_adapter.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_facets.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_listener.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_macros.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_openlineage.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/plugins/test_utils.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/test_conf.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/utils/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/utils/custom_facet_fixture.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/utils/test_selective_enable.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/utils/test_spark.py +0 -0
- {apache_airflow_providers_openlineage-2.7.2rc1 → apache_airflow_providers_openlineage-2.7.3}/tests/unit/openlineage/utils/test_sql.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-openlineage
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.3
|
|
4
4
|
Summary: Provider package apache-airflow-providers-openlineage for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,openlineage,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -20,15 +20,15 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
|
-
Requires-Dist: apache-airflow>=2.10.
|
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.20.
|
|
25
|
-
Requires-Dist: apache-airflow-providers-common-compat>=1.
|
|
23
|
+
Requires-Dist: apache-airflow>=2.10.0
|
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.20.0
|
|
25
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.8.0
|
|
26
26
|
Requires-Dist: attrs>=22.2
|
|
27
|
-
Requires-Dist: openlineage-integration-common>=1.
|
|
28
|
-
Requires-Dist: openlineage-python>=1.
|
|
27
|
+
Requires-Dist: openlineage-integration-common>=1.38.0
|
|
28
|
+
Requires-Dist: openlineage-python>=1.38.0
|
|
29
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
30
|
-
Project-URL: Changelog, https://airflow.
|
|
31
|
-
Project-URL: Documentation, https://airflow.
|
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3/changelog.html
|
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3
|
|
32
32
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -59,7 +59,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
59
59
|
|
|
60
60
|
Package ``apache-airflow-providers-openlineage``
|
|
61
61
|
|
|
62
|
-
Release: ``2.7.
|
|
62
|
+
Release: ``2.7.3``
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -72,7 +72,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
72
72
|
are in ``airflow.providers.openlineage`` python package.
|
|
73
73
|
|
|
74
74
|
You can find package information and changelog for the provider
|
|
75
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.
|
|
75
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3/>`_.
|
|
76
76
|
|
|
77
77
|
Installation
|
|
78
78
|
------------
|
|
@@ -91,10 +91,10 @@ PIP package Version required
|
|
|
91
91
|
========================================== ==================
|
|
92
92
|
``apache-airflow`` ``>=2.10.0``
|
|
93
93
|
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
|
94
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
94
|
+
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
95
95
|
``attrs`` ``>=22.2``
|
|
96
|
-
``openlineage-integration-common`` ``>=1.
|
|
97
|
-
``openlineage-python`` ``>=1.
|
|
96
|
+
``openlineage-integration-common`` ``>=1.38.0``
|
|
97
|
+
``openlineage-python`` ``>=1.38.0``
|
|
98
98
|
========================================== ==================
|
|
99
99
|
|
|
100
100
|
Cross provider package dependencies
|
|
@@ -118,5 +118,5 @@ Dependent package
|
|
|
118
118
|
================================================================================================================== =================
|
|
119
119
|
|
|
120
120
|
The changelog for the provider package can be found in the
|
|
121
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.
|
|
121
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3/changelog.html>`_.
|
|
122
122
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-openlineage``
|
|
25
25
|
|
|
26
|
-
Release: ``2.7.
|
|
26
|
+
Release: ``2.7.3``
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -36,7 +36,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
36
36
|
are in ``airflow.providers.openlineage`` python package.
|
|
37
37
|
|
|
38
38
|
You can find package information and changelog for the provider
|
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3/>`_.
|
|
40
40
|
|
|
41
41
|
Installation
|
|
42
42
|
------------
|
|
@@ -55,10 +55,10 @@ PIP package Version required
|
|
|
55
55
|
========================================== ==================
|
|
56
56
|
``apache-airflow`` ``>=2.10.0``
|
|
57
57
|
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
|
58
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
58
|
+
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
59
59
|
``attrs`` ``>=22.2``
|
|
60
|
-
``openlineage-integration-common`` ``>=1.
|
|
61
|
-
``openlineage-python`` ``>=1.
|
|
60
|
+
``openlineage-integration-common`` ``>=1.38.0``
|
|
61
|
+
``openlineage-python`` ``>=1.38.0``
|
|
62
62
|
========================================== ==================
|
|
63
63
|
|
|
64
64
|
Cross provider package dependencies
|
|
@@ -82,4 +82,4 @@ Dependent package
|
|
|
82
82
|
================================================================================================================== =================
|
|
83
83
|
|
|
84
84
|
The changelog for the provider package can be found in the
|
|
85
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.
|
|
85
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3/changelog.html>`_.
|
|
@@ -26,6 +26,32 @@
|
|
|
26
26
|
Changelog
|
|
27
27
|
---------
|
|
28
28
|
|
|
29
|
+
2.7.3
|
|
30
|
+
.....
|
|
31
|
+
|
|
32
|
+
Bug Fixes
|
|
33
|
+
~~~~~~~~~
|
|
34
|
+
|
|
35
|
+
* ``Fix openlineage dag state event emit on timed out dag (#56542)``
|
|
36
|
+
* ``Only import OpenLineage plugin listeners/hooks if plugin is enabled (#56266)``
|
|
37
|
+
|
|
38
|
+
Misc
|
|
39
|
+
~~~~
|
|
40
|
+
|
|
41
|
+
* ``nit: Bump required OL client for Openlineage provider (#56302)``
|
|
42
|
+
* ``chore: safeguard external call in OL sqlparser (#55692)``
|
|
43
|
+
|
|
44
|
+
Doc-only
|
|
45
|
+
~~~~~~~~
|
|
46
|
+
|
|
47
|
+
* ``Correct 'Dag' to 'DAG' for code snippets in provider docs (#56727)``
|
|
48
|
+
* ``Remove placeholder Release Date in changelog and index files (#56056)``
|
|
49
|
+
|
|
50
|
+
.. Below changes are excluded from the changelog. Move them to
|
|
51
|
+
appropriate section above if needed. Do not delete the lines(!):
|
|
52
|
+
* ``chore: add sleep in ol test operator (#54807)``
|
|
53
|
+
* ``Fix DagBag imports in 3.2+ (#56109)``
|
|
54
|
+
|
|
29
55
|
2.7.2
|
|
30
56
|
.....
|
|
31
57
|
|
|
@@ -43,8 +69,6 @@ Misc
|
|
|
43
69
|
.....
|
|
44
70
|
|
|
45
71
|
|
|
46
|
-
Release Date: ``|PypiReleaseDate|``
|
|
47
|
-
|
|
48
72
|
Bug Fixes
|
|
49
73
|
~~~~~~~~~
|
|
50
74
|
|
|
@@ -63,8 +87,6 @@ Misc
|
|
|
63
87
|
.....
|
|
64
88
|
|
|
65
89
|
|
|
66
|
-
Release Date: ``|PypiReleaseDate|``
|
|
67
|
-
|
|
68
90
|
Features
|
|
69
91
|
~~~~~~~~
|
|
70
92
|
|
|
@@ -396,7 +396,7 @@ While enabling lineage on a Dag implicitly enables it for all tasks within that
|
|
|
396
396
|
|
|
397
397
|
from airflow.providers.openlineage.utils.selective_enable import disable_lineage, enable_lineage
|
|
398
398
|
|
|
399
|
-
with
|
|
399
|
+
with DAG(...) as dag:
|
|
400
400
|
t1 = MyOperator(...)
|
|
401
401
|
t2 = AnotherOperator(...)
|
|
402
402
|
|
|
@@ -81,7 +81,7 @@ apache-airflow-providers-openlineage package
|
|
|
81
81
|
`OpenLineage <https://openlineage.io/>`__
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
Release: 2.7.
|
|
84
|
+
Release: 2.7.3
|
|
85
85
|
|
|
86
86
|
Provider package
|
|
87
87
|
----------------
|
|
@@ -106,10 +106,10 @@ PIP package Version required
|
|
|
106
106
|
========================================== ==================
|
|
107
107
|
``apache-airflow`` ``>=2.10.0``
|
|
108
108
|
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
|
109
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
109
|
+
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
110
110
|
``attrs`` ``>=22.2``
|
|
111
|
-
``openlineage-integration-common`` ``>=1.
|
|
112
|
-
``openlineage-python`` ``>=1.
|
|
111
|
+
``openlineage-integration-common`` ``>=1.38.0``
|
|
112
|
+
``openlineage-python`` ``>=1.38.0``
|
|
113
113
|
========================================== ==================
|
|
114
114
|
|
|
115
115
|
Cross provider package dependencies
|
|
@@ -138,5 +138,5 @@ Downloading official packages
|
|
|
138
138
|
You can download officially released packages and verify their checksums and signatures from the
|
|
139
139
|
`Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
|
|
140
140
|
|
|
141
|
-
* `The apache-airflow-providers-openlineage 2.7.
|
|
142
|
-
* `The apache-airflow-providers-openlineage 2.7.
|
|
141
|
+
* `The apache-airflow-providers-openlineage 2.7.3 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.7.3.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.7.3.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.7.3.tar.gz.sha512>`__)
|
|
142
|
+
* `The apache-airflow-providers-openlineage 2.7.3 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.7.3-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.7.3-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_openlineage-2.7.3-py3-none-any.whl.sha512>`__)
|
|
@@ -22,12 +22,13 @@ description: |
|
|
|
22
22
|
`OpenLineage <https://openlineage.io/>`__
|
|
23
23
|
|
|
24
24
|
state: ready
|
|
25
|
-
source-date-epoch:
|
|
25
|
+
source-date-epoch: 1761117353
|
|
26
26
|
# Note that those versions are maintained by release manager - do not update them manually
|
|
27
27
|
# with the exception of case where other provider in sources has >= new provider version.
|
|
28
28
|
# In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
|
|
29
29
|
# to be done in the same PR
|
|
30
30
|
versions:
|
|
31
|
+
- 2.7.3
|
|
31
32
|
- 2.7.2
|
|
32
33
|
- 2.7.1
|
|
33
34
|
- 2.7.0
|
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-openlineage"
|
|
28
|
-
version = "2.7.
|
|
28
|
+
version = "2.7.3"
|
|
29
29
|
description = "Provider package apache-airflow-providers-openlineage for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -57,12 +57,12 @@ requires-python = ">=3.10"
|
|
|
57
57
|
# Make sure to run ``prek update-providers-dependencies --all-files``
|
|
58
58
|
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
|
|
59
59
|
dependencies = [
|
|
60
|
-
"apache-airflow>=2.10.
|
|
61
|
-
"apache-airflow-providers-common-sql>=1.20.
|
|
62
|
-
"apache-airflow-providers-common-compat>=1.
|
|
60
|
+
"apache-airflow>=2.10.0",
|
|
61
|
+
"apache-airflow-providers-common-sql>=1.20.0",
|
|
62
|
+
"apache-airflow-providers-common-compat>=1.8.0",
|
|
63
63
|
"attrs>=22.2",
|
|
64
|
-
"openlineage-integration-common>=1.
|
|
65
|
-
"openlineage-python>=1.
|
|
64
|
+
"openlineage-integration-common>=1.38.0",
|
|
65
|
+
"openlineage-python>=1.38.0",
|
|
66
66
|
]
|
|
67
67
|
|
|
68
68
|
[dependency-groups]
|
|
@@ -105,8 +105,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
|
105
105
|
apache-airflow-providers-standard = {workspace = true}
|
|
106
106
|
|
|
107
107
|
[project.urls]
|
|
108
|
-
"Documentation" = "https://airflow.
|
|
109
|
-
"Changelog" = "https://airflow.
|
|
108
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3"
|
|
109
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.7.3/changelog.html"
|
|
110
110
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
111
111
|
"Source Code" = "https://github.com/apache/airflow"
|
|
112
112
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "2.7.
|
|
32
|
+
__version__ = "2.7.3"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.10.0"
|
|
@@ -18,16 +18,20 @@ from __future__ import annotations
|
|
|
18
18
|
|
|
19
19
|
from airflow.plugins_manager import AirflowPlugin
|
|
20
20
|
from airflow.providers.openlineage import conf
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
|
|
22
|
+
# Conditional imports - only load expensive dependencies when plugin is enabled
|
|
23
|
+
if not conf.is_disabled():
|
|
24
|
+
from airflow.lineage.hook import HookLineageReader
|
|
25
|
+
from airflow.providers.openlineage.plugins.listener import get_openlineage_listener
|
|
26
|
+
from airflow.providers.openlineage.plugins.macros import (
|
|
27
|
+
lineage_job_name,
|
|
28
|
+
lineage_job_namespace,
|
|
29
|
+
lineage_parent_id,
|
|
30
|
+
lineage_root_job_name,
|
|
31
|
+
lineage_root_parent_id,
|
|
32
|
+
lineage_root_run_id,
|
|
33
|
+
lineage_run_id,
|
|
34
|
+
)
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
class OpenLineageProviderPlugin(AirflowPlugin):
|
|
@@ -50,8 +54,6 @@ class OpenLineageProviderPlugin(AirflowPlugin):
|
|
|
50
54
|
lineage_root_parent_id,
|
|
51
55
|
]
|
|
52
56
|
listeners = [get_openlineage_listener()]
|
|
53
|
-
from airflow.lineage.hook import HookLineageReader
|
|
54
|
-
|
|
55
57
|
hook_lineage_readers = [HookLineageReader]
|
|
56
58
|
else:
|
|
57
59
|
macros = []
|
|
@@ -232,8 +232,8 @@ class SQLParser(LoggingMixin):
|
|
|
232
232
|
else None,
|
|
233
233
|
)
|
|
234
234
|
|
|
235
|
+
@staticmethod
|
|
235
236
|
def get_metadata_from_parser(
|
|
236
|
-
self,
|
|
237
237
|
inputs: list[DbTableMeta],
|
|
238
238
|
outputs: list[DbTableMeta],
|
|
239
239
|
database_info: DatabaseInfo,
|
|
@@ -315,6 +315,7 @@ class SQLParser(LoggingMixin):
|
|
|
315
315
|
:param database_info: database specific information
|
|
316
316
|
:param database: when passed it takes precedence over parsed database name
|
|
317
317
|
:param sqlalchemy_engine: when passed, engine's dialect is used to compile SQL queries
|
|
318
|
+
:param use_connection: if call to db should be performed to enrich datasets (e.g., with schema)
|
|
318
319
|
"""
|
|
319
320
|
job_facets: dict[str, JobFacet] = {"sql": sql_job.SQLJobFacet(query=self.normalize_sql(sql))}
|
|
320
321
|
parse_result = self.parse(sql=self.split_sql_string(sql))
|
|
@@ -338,17 +339,28 @@ class SQLParser(LoggingMixin):
|
|
|
338
339
|
)
|
|
339
340
|
|
|
340
341
|
namespace = self.create_namespace(database_info=database_info)
|
|
342
|
+
inputs: list[Dataset] = []
|
|
343
|
+
outputs: list[Dataset] = []
|
|
341
344
|
if use_connection:
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
345
|
+
try:
|
|
346
|
+
inputs, outputs = self.parse_table_schemas(
|
|
347
|
+
hook=hook,
|
|
348
|
+
inputs=parse_result.in_tables,
|
|
349
|
+
outputs=parse_result.out_tables,
|
|
350
|
+
namespace=namespace,
|
|
351
|
+
database=database,
|
|
352
|
+
database_info=database_info,
|
|
353
|
+
sqlalchemy_engine=sqlalchemy_engine,
|
|
354
|
+
)
|
|
355
|
+
except Exception as e:
|
|
356
|
+
self.log.warning(
|
|
357
|
+
"OpenLineage method failed to enrich datasets using db metadata. Exception: `%s`",
|
|
358
|
+
e,
|
|
359
|
+
)
|
|
360
|
+
self.log.debug("OpenLineage failure details:", exc_info=True)
|
|
361
|
+
|
|
362
|
+
# If call to db failed or was not performed, use datasets from sql parsing alone
|
|
363
|
+
if not inputs and not outputs:
|
|
352
364
|
inputs, outputs = self.get_metadata_from_parser(
|
|
353
365
|
inputs=parse_result.in_tables,
|
|
354
366
|
outputs=parse_result.out_tables,
|
|
@@ -751,16 +751,20 @@ def get_airflow_state_run_facet(
|
|
|
751
751
|
dag_id: str, run_id: str, task_ids: list[str], dag_run_state: DagRunState
|
|
752
752
|
) -> dict[str, AirflowStateRunFacet]:
|
|
753
753
|
tis = DagRun.fetch_task_instances(dag_id=dag_id, run_id=run_id, task_ids=task_ids)
|
|
754
|
+
|
|
755
|
+
def get_task_duration(ti):
|
|
756
|
+
if ti.duration is not None:
|
|
757
|
+
return ti.duration
|
|
758
|
+
if ti.end_date is not None and ti.start_date is not None:
|
|
759
|
+
return (ti.end_date - ti.start_date).total_seconds()
|
|
760
|
+
# Fallback to 0.0 for tasks with missing timestamps (e.g., skipped/terminated tasks)
|
|
761
|
+
return 0.0
|
|
762
|
+
|
|
754
763
|
return {
|
|
755
764
|
"airflowState": AirflowStateRunFacet(
|
|
756
765
|
dagRunState=dag_run_state,
|
|
757
766
|
tasksState={ti.task_id: ti.state for ti in tis},
|
|
758
|
-
tasksDuration={
|
|
759
|
-
ti.task_id: ti.duration
|
|
760
|
-
if ti.duration is not None
|
|
761
|
-
else (ti.end_date - ti.start_date).total_seconds()
|
|
762
|
-
for ti in tis
|
|
763
|
-
},
|
|
767
|
+
tasksDuration={ti.task_id: get_task_duration(ti) for ti in tis},
|
|
764
768
|
)
|
|
765
769
|
}
|
|
766
770
|
|
|
@@ -21,6 +21,7 @@ import json
|
|
|
21
21
|
import logging
|
|
22
22
|
import os
|
|
23
23
|
import re
|
|
24
|
+
import time
|
|
24
25
|
import uuid
|
|
25
26
|
from typing import TYPE_CHECKING, Any
|
|
26
27
|
from urllib.parse import urlparse
|
|
@@ -220,6 +221,7 @@ class OpenLineageTestOperator(BaseOperator):
|
|
|
220
221
|
raise ValueError("Can't pass both event_templates and file_path")
|
|
221
222
|
|
|
222
223
|
def execute(self, context: Context) -> None:
|
|
224
|
+
time.sleep(10) # Wait for all variables to update properly
|
|
223
225
|
if self.file_path is not None:
|
|
224
226
|
self.event_templates = {}
|
|
225
227
|
self.log.info("Reading OpenLineage event templates from file `%s`", self.file_path)
|
|
@@ -37,9 +37,9 @@ from airflow.utils.types import DagRunType
|
|
|
37
37
|
|
|
38
38
|
from tests_common.test_utils.config import conf_vars
|
|
39
39
|
from tests_common.test_utils.db import clear_db_runs
|
|
40
|
-
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS,
|
|
40
|
+
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS, AIRFLOW_V_3_2_PLUS
|
|
41
41
|
|
|
42
|
-
if
|
|
42
|
+
if AIRFLOW_V_3_2_PLUS:
|
|
43
43
|
from airflow.dag_processing.dagbag import DagBag
|
|
44
44
|
else:
|
|
45
45
|
from airflow.models.dagbag import DagBag # type: ignore[attr-defined, no-redef]
|
|
@@ -356,3 +356,53 @@ class TestSQLParser:
|
|
|
356
356
|
}
|
|
357
357
|
)
|
|
358
358
|
assert metadata.job_facets["sql"].query.replace(" ", "") == formatted_sql.replace(" ", "")
|
|
359
|
+
|
|
360
|
+
def test_generate_openlineage_metadata_from_sql_with_db_error(self):
|
|
361
|
+
parser = SQLParser(default_schema="ANOTHER_SCHEMA")
|
|
362
|
+
db_info = DatabaseInfo(scheme="myscheme", authority="host:port")
|
|
363
|
+
|
|
364
|
+
hook = MagicMock()
|
|
365
|
+
|
|
366
|
+
sql = """INSERT INTO popular_orders_day_of_week (order_day_of_week)
|
|
367
|
+
SELECT EXTRACT(ISODOW FROM order_placed_on) AS order_day_of_week
|
|
368
|
+
FROM top_delivery_times -- irrelevant comment"""
|
|
369
|
+
|
|
370
|
+
hook.get_conn.side_effect = RuntimeError("Simulated DB error")
|
|
371
|
+
|
|
372
|
+
formatted_sql = """INSERT INTO popular_orders_day_of_week (order_day_of_week)
|
|
373
|
+
SELECT EXTRACT(ISODOW FROM order_placed_on) AS order_day_of_week
|
|
374
|
+
FROM top_delivery_times"""
|
|
375
|
+
expected_schema = "ANOTHER_SCHEMA"
|
|
376
|
+
metadata = parser.generate_openlineage_metadata_from_sql(
|
|
377
|
+
sql=sql, hook=hook, database_info=db_info, use_connection=True
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
assert metadata.inputs == [
|
|
381
|
+
Dataset(
|
|
382
|
+
namespace="myscheme://host:port",
|
|
383
|
+
name=f"{expected_schema}.top_delivery_times",
|
|
384
|
+
facets={},
|
|
385
|
+
)
|
|
386
|
+
]
|
|
387
|
+
assert len(metadata.outputs) == 1
|
|
388
|
+
assert metadata.outputs[0].namespace == "myscheme://host:port"
|
|
389
|
+
assert metadata.outputs[0].name == f"{expected_schema}.popular_orders_day_of_week"
|
|
390
|
+
assert len(metadata.outputs[0].facets) == 1
|
|
391
|
+
assert metadata.outputs[0].facets[
|
|
392
|
+
"columnLineage"
|
|
393
|
+
] == column_lineage_dataset.ColumnLineageDatasetFacet(
|
|
394
|
+
fields={
|
|
395
|
+
"order_day_of_week": column_lineage_dataset.Fields(
|
|
396
|
+
inputFields=[
|
|
397
|
+
column_lineage_dataset.InputField(
|
|
398
|
+
namespace="myscheme://host:port",
|
|
399
|
+
name=f"{expected_schema}.top_delivery_times",
|
|
400
|
+
field="order_placed_on",
|
|
401
|
+
)
|
|
402
|
+
],
|
|
403
|
+
transformationDescription="",
|
|
404
|
+
transformationType="",
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
assert metadata.job_facets["sql"].query.replace(" ", "") == formatted_sql.replace(" ", "")
|
|
@@ -44,6 +44,7 @@ from airflow.providers.openlineage.utils.utils import (
|
|
|
44
44
|
_truncate_string_to_byte_size,
|
|
45
45
|
get_airflow_dag_run_facet,
|
|
46
46
|
get_airflow_job_facet,
|
|
47
|
+
get_airflow_state_run_facet,
|
|
47
48
|
get_dag_documentation,
|
|
48
49
|
get_fully_qualified_class_name,
|
|
49
50
|
get_job_name,
|
|
@@ -57,6 +58,7 @@ from airflow.serialization.serialized_objects import SerializedBaseOperator
|
|
|
57
58
|
from airflow.timetables.events import EventsTimetable
|
|
58
59
|
from airflow.timetables.trigger import CronTriggerTimetable
|
|
59
60
|
from airflow.utils import timezone
|
|
61
|
+
from airflow.utils.session import create_session
|
|
60
62
|
from airflow.utils.state import DagRunState
|
|
61
63
|
from airflow.utils.types import DagRunType
|
|
62
64
|
|
|
@@ -2054,3 +2056,65 @@ def test_get_operator_provider_version_for_mapped_operator(mock_providers_manage
|
|
|
2054
2056
|
mapped_operator = BashOperator.partial(task_id="test_task").expand(bash_command=["echo 1", "echo 2"])
|
|
2055
2057
|
result = get_operator_provider_version(mapped_operator)
|
|
2056
2058
|
assert result == "1.2.0"
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
class TestGetAirflowStateRunFacet:
|
|
2062
|
+
@pytest.mark.db_test
|
|
2063
|
+
def test_task_with_timestamps_defined(self, dag_maker):
|
|
2064
|
+
"""Test task instance with defined start_date and end_date."""
|
|
2065
|
+
with dag_maker(dag_id="test_dag"):
|
|
2066
|
+
BaseOperator(task_id="test_task")
|
|
2067
|
+
|
|
2068
|
+
dag_run = dag_maker.create_dagrun()
|
|
2069
|
+
ti = dag_run.get_task_instance(task_id="test_task")
|
|
2070
|
+
|
|
2071
|
+
# Set valid timestamps
|
|
2072
|
+
start_time = pendulum.parse("2024-01-01T10:00:00Z")
|
|
2073
|
+
end_time = pendulum.parse("2024-01-01T10:02:30Z") # 150 seconds difference
|
|
2074
|
+
ti.start_date = start_time
|
|
2075
|
+
ti.end_date = end_time
|
|
2076
|
+
ti.state = TaskInstanceState.SUCCESS
|
|
2077
|
+
ti.duration = None
|
|
2078
|
+
|
|
2079
|
+
# Persist changes to database
|
|
2080
|
+
with create_session() as session:
|
|
2081
|
+
session.merge(ti)
|
|
2082
|
+
session.commit()
|
|
2083
|
+
|
|
2084
|
+
result = get_airflow_state_run_facet(
|
|
2085
|
+
dag_id="test_dag",
|
|
2086
|
+
run_id=dag_run.run_id,
|
|
2087
|
+
task_ids=["test_task"],
|
|
2088
|
+
dag_run_state=DagRunState.SUCCESS,
|
|
2089
|
+
)
|
|
2090
|
+
|
|
2091
|
+
assert result["airflowState"].tasksDuration["test_task"] == 150.0
|
|
2092
|
+
|
|
2093
|
+
@pytest.mark.db_test
|
|
2094
|
+
def test_task_with_none_timestamps_fallback_to_zero(self, dag_maker):
|
|
2095
|
+
"""Test task with None timestamps falls back to 0.0."""
|
|
2096
|
+
with dag_maker(dag_id="test_dag"):
|
|
2097
|
+
BaseOperator(task_id="terminated_task")
|
|
2098
|
+
|
|
2099
|
+
dag_run = dag_maker.create_dagrun()
|
|
2100
|
+
ti = dag_run.get_task_instance(task_id="terminated_task")
|
|
2101
|
+
|
|
2102
|
+
# Set None timestamps (signal-terminated case)
|
|
2103
|
+
ti.start_date = None
|
|
2104
|
+
ti.end_date = None
|
|
2105
|
+
ti.state = TaskInstanceState.SKIPPED
|
|
2106
|
+
ti.duration = None
|
|
2107
|
+
|
|
2108
|
+
# Persist changes to database
|
|
2109
|
+
with create_session() as session:
|
|
2110
|
+
session.merge(ti)
|
|
2111
|
+
session.commit()
|
|
2112
|
+
|
|
2113
|
+
result = get_airflow_state_run_facet(
|
|
2114
|
+
dag_id="test_dag",
|
|
2115
|
+
run_id=dag_run.run_id,
|
|
2116
|
+
task_ids=["terminated_task"],
|
|
2117
|
+
dag_run_state=DagRunState.FAILED,
|
|
2118
|
+
)
|
|
2119
|
+
|
|
2120
|
+
assert result["airflowState"].tasksDuration["terminated_task"] == 0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|