acryl-datahub-airflow-plugin 0.12.0.4__tar.gz → 1.3.1.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.
- acryl_datahub_airflow_plugin-1.3.1.3/PKG-INFO +90 -0
- acryl_datahub_airflow_plugin-1.3.1.3/README.md +7 -0
- acryl_datahub_airflow_plugin-1.3.1.3/pyproject.toml +60 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/setup.cfg +0 -16
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/setup.py +34 -57
- acryl_datahub_airflow_plugin-1.3.1.3/src/acryl_datahub_airflow_plugin.egg-info/PKG-INFO +90 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/acryl_datahub_airflow_plugin.egg-info/SOURCES.txt +2 -6
- acryl_datahub_airflow_plugin-1.3.1.3/src/acryl_datahub_airflow_plugin.egg-info/requires.txt +55 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/__init__.py +4 -15
- acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/_airflow_shims.py +42 -0
- acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/_config.py +142 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/_datahub_ol_adapter.py +2 -2
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/_extractors.py +114 -22
- acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/_version.py +3 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/client/airflow_generator.py +77 -30
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/datahub_listener.py +342 -50
- acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/datahub_plugin.py +33 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/entities.py +3 -2
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/generic_recipe_sample_dag.py +1 -1
- acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/example_dags/graph_usage_sample_dag.py +35 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/lineage_backend_demo.py +0 -1
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/lineage_backend_taskflow_demo.py +0 -1
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/lineage_emission_dag.py +2 -2
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/mysql_sample_dag.py +0 -1
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/snowflake_sample_dag.py +0 -1
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/hooks/datahub.py +54 -2
- acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/operators/datahub.py +105 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/operators/datahub_operation_operator.py +2 -2
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/operators/datahub_operation_sensor.py +3 -3
- acryl-datahub-airflow-plugin-0.12.0.4/PKG-INFO +0 -138
- acryl-datahub-airflow-plugin-0.12.0.4/README.md +0 -4
- acryl-datahub-airflow-plugin-0.12.0.4/pyproject.toml +0 -20
- acryl-datahub-airflow-plugin-0.12.0.4/src/acryl_datahub_airflow_plugin.egg-info/PKG-INFO +0 -138
- acryl-datahub-airflow-plugin-0.12.0.4/src/acryl_datahub_airflow_plugin.egg-info/requires.txt +0 -119
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/_airflow_compat.py +0 -12
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/_airflow_shims.py +0 -66
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/_config.py +0 -80
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/_datahub_listener_module.py +0 -34
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/datahub_plugin.py +0 -72
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/datahub_plugin_v22.py +0 -379
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/lineage/_lineage_core.py +0 -91
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/lineage/datahub.py +0 -77
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/operators/__init__.py +0 -0
- acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/operators/datahub.py +0 -63
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/acryl_datahub_airflow_plugin.egg-info/dependency_links.txt +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/acryl_datahub_airflow_plugin.egg-info/entry_points.txt +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/acryl_datahub_airflow_plugin.egg-info/not-zip-safe +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/acryl_datahub_airflow_plugin.egg-info/top_level.txt +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/client/__init__.py +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/example_dags/__init__.py +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/hooks/__init__.py +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4/src/datahub_airflow_plugin/lineage → acryl_datahub_airflow_plugin-1.3.1.3/src/datahub_airflow_plugin/operators}/__init__.py +0 -0
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/operators/datahub_assertion_operator.py +1 -1
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/operators/datahub_assertion_sensor.py +1 -1
- {acryl-datahub-airflow-plugin-0.12.0.4 → acryl_datahub_airflow_plugin-1.3.1.3}/src/datahub_airflow_plugin/py.typed +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: acryl-datahub-airflow-plugin
|
|
3
|
+
Version: 1.3.1.3
|
|
4
|
+
Summary: Datahub Airflow plugin to capture executions and send to Datahub
|
|
5
|
+
Home-page: https://docs.datahub.com/
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Documentation, https://docs.datahub.com/docs/
|
|
8
|
+
Project-URL: Source, https://github.com/datahub-project/datahub
|
|
9
|
+
Project-URL: Changelog, https://github.com/datahub-project/datahub/releases
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: Operating System :: Unix
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Environment :: Console
|
|
20
|
+
Classifier: Environment :: MacOS X
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: apache-airflow<3,>=2.7.0
|
|
25
|
+
Requires-Dist: openlineage-airflow<=1.30.1,>=1.2.0
|
|
26
|
+
Requires-Dist: acryl-datahub[datahub-rest]==1.3.1.3
|
|
27
|
+
Requires-Dist: pydantic>=2.4.0
|
|
28
|
+
Requires-Dist: acryl-datahub[datahub-rest,sql-parser]==1.3.1.3
|
|
29
|
+
Provides-Extra: ignore
|
|
30
|
+
Provides-Extra: datahub-rest
|
|
31
|
+
Requires-Dist: acryl-datahub[datahub-rest]==1.3.1.3; extra == "datahub-rest"
|
|
32
|
+
Provides-Extra: datahub-kafka
|
|
33
|
+
Requires-Dist: acryl-datahub[datahub-kafka]==1.3.1.3; extra == "datahub-kafka"
|
|
34
|
+
Provides-Extra: datahub-file
|
|
35
|
+
Requires-Dist: acryl-datahub[sync-file-emitter]==1.3.1.3; extra == "datahub-file"
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: tox-uv; extra == "dev"
|
|
38
|
+
Requires-Dist: packaging; extra == "dev"
|
|
39
|
+
Requires-Dist: types-setuptools; extra == "dev"
|
|
40
|
+
Requires-Dist: acryl-datahub[datahub-rest,sql-parser]==1.3.1.3; extra == "dev"
|
|
41
|
+
Requires-Dist: types-toml; extra == "dev"
|
|
42
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
43
|
+
Requires-Dist: types-click==0.1.12; extra == "dev"
|
|
44
|
+
Requires-Dist: mypy==1.17.1; extra == "dev"
|
|
45
|
+
Requires-Dist: deepdiff!=8.0.0; extra == "dev"
|
|
46
|
+
Requires-Dist: types-cachetools; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest-cov>=2.8.1; extra == "dev"
|
|
48
|
+
Requires-Dist: tox; extra == "dev"
|
|
49
|
+
Requires-Dist: types-python-dateutil; extra == "dev"
|
|
50
|
+
Requires-Dist: types-six; extra == "dev"
|
|
51
|
+
Requires-Dist: tenacity; extra == "dev"
|
|
52
|
+
Requires-Dist: types-requests; extra == "dev"
|
|
53
|
+
Requires-Dist: acryl-datahub[datahub-rest]==1.3.1.3; extra == "dev"
|
|
54
|
+
Requires-Dist: sqlalchemy-stubs; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest>=6.2.2; extra == "dev"
|
|
56
|
+
Requires-Dist: build; extra == "dev"
|
|
57
|
+
Requires-Dist: types-tabulate; extra == "dev"
|
|
58
|
+
Requires-Dist: apache-airflow<3,>=2.7.0; extra == "dev"
|
|
59
|
+
Requires-Dist: types-dataclasses; extra == "dev"
|
|
60
|
+
Requires-Dist: pydantic>=2.4.0; extra == "dev"
|
|
61
|
+
Requires-Dist: twine; extra == "dev"
|
|
62
|
+
Requires-Dist: coverage>=5.1; extra == "dev"
|
|
63
|
+
Requires-Dist: openlineage-airflow<=1.30.1,>=1.2.0; extra == "dev"
|
|
64
|
+
Requires-Dist: ruff==0.11.7; extra == "dev"
|
|
65
|
+
Provides-Extra: integration-tests
|
|
66
|
+
Requires-Dist: acryl-datahub[datahub-kafka]==1.3.1.3; extra == "integration-tests"
|
|
67
|
+
Requires-Dist: snowflake-connector-python>=2.7.10; extra == "integration-tests"
|
|
68
|
+
Requires-Dist: virtualenv; extra == "integration-tests"
|
|
69
|
+
Requires-Dist: acryl-datahub[sync-file-emitter]==1.3.1.3; extra == "integration-tests"
|
|
70
|
+
Requires-Dist: acryl-datahub[testing-utils]==1.3.1.3; extra == "integration-tests"
|
|
71
|
+
Requires-Dist: apache-airflow[amazon,google,snowflake]>=2.0.2; extra == "integration-tests"
|
|
72
|
+
Requires-Dist: apache-airflow-providers-sqlite; extra == "integration-tests"
|
|
73
|
+
Dynamic: classifier
|
|
74
|
+
Dynamic: description
|
|
75
|
+
Dynamic: description-content-type
|
|
76
|
+
Dynamic: home-page
|
|
77
|
+
Dynamic: license
|
|
78
|
+
Dynamic: project-url
|
|
79
|
+
Dynamic: provides-extra
|
|
80
|
+
Dynamic: requires-dist
|
|
81
|
+
Dynamic: requires-python
|
|
82
|
+
Dynamic: summary
|
|
83
|
+
|
|
84
|
+
# Datahub Airflow Plugin
|
|
85
|
+
|
|
86
|
+
See [the DataHub Airflow docs](https://docs.datahub.com/docs/lineage/airflow) for details.
|
|
87
|
+
|
|
88
|
+
## Developing
|
|
89
|
+
|
|
90
|
+
See the [developing docs](../../metadata-ingestion/developing.md).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "setuptools.build_meta"
|
|
3
|
+
requires = ["setuptools>=78.1.1", "wheel", "pip>=21.0.0"]
|
|
4
|
+
|
|
5
|
+
[tool.ruff]
|
|
6
|
+
line-length = 88
|
|
7
|
+
target-version = "py39"
|
|
8
|
+
exclude = [
|
|
9
|
+
".git",
|
|
10
|
+
"venv",
|
|
11
|
+
".tox",
|
|
12
|
+
"__pycache__",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[tool.ruff.format]
|
|
16
|
+
quote-style = "double"
|
|
17
|
+
indent-style = "space"
|
|
18
|
+
skip-magic-trailing-comma = false
|
|
19
|
+
line-ending = "auto"
|
|
20
|
+
|
|
21
|
+
[tool.ruff.lint.isort]
|
|
22
|
+
combine-as-imports = true
|
|
23
|
+
known-first-party = ["datahub"]
|
|
24
|
+
extra-standard-library = ["__future__", "datahub.utilities._markupsafe_compat", "datahub.sql_parsing._sqlglot_patch"]
|
|
25
|
+
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
26
|
+
force-sort-within-sections = false
|
|
27
|
+
force-wrap-aliases = false
|
|
28
|
+
split-on-trailing-comma = false
|
|
29
|
+
order-by-type = true
|
|
30
|
+
relative-imports-order = "closest-to-furthest"
|
|
31
|
+
force-single-line = false
|
|
32
|
+
single-line-exclusions = ["typing"]
|
|
33
|
+
length-sort = false
|
|
34
|
+
from-first = false
|
|
35
|
+
required-imports = []
|
|
36
|
+
classes = ["typing"]
|
|
37
|
+
|
|
38
|
+
[tool.ruff.lint]
|
|
39
|
+
extend-select = [
|
|
40
|
+
"B", # flake8-bugbear
|
|
41
|
+
"C90", # mccabe complexity
|
|
42
|
+
"E", # pycodestyle errors
|
|
43
|
+
"F", # pyflakes
|
|
44
|
+
"G010", # logging.warn -> logging.warning
|
|
45
|
+
"I", # isort
|
|
46
|
+
"TID", # flake8-tidy-imports
|
|
47
|
+
"RUF100", # unused-noqa
|
|
48
|
+
]
|
|
49
|
+
ignore = [
|
|
50
|
+
"E501", # Line length violations (handled by formatter)
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint.mccabe]
|
|
54
|
+
max-complexity = 15
|
|
55
|
+
|
|
56
|
+
[tool.ruff.lint.flake8-tidy-imports]
|
|
57
|
+
ban-relative-imports = "all"
|
|
58
|
+
|
|
59
|
+
[tool.ruff.lint.per-file-ignores]
|
|
60
|
+
"__init__.py" = ["F401"]
|
|
@@ -5,7 +5,7 @@ from typing import Dict, Set
|
|
|
5
5
|
import setuptools
|
|
6
6
|
|
|
7
7
|
package_metadata: dict = {}
|
|
8
|
-
with open("./src/datahub_airflow_plugin/
|
|
8
|
+
with open("./src/datahub_airflow_plugin/_version.py") as fp:
|
|
9
9
|
exec(fp.read(), package_metadata)
|
|
10
10
|
|
|
11
11
|
|
|
@@ -15,19 +15,22 @@ def get_long_description():
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
_version: str = package_metadata["__version__"]
|
|
18
|
-
_self_pin =
|
|
19
|
-
|
|
18
|
+
_self_pin = (
|
|
19
|
+
f"=={_version}"
|
|
20
|
+
if not (_version.endswith(("dev0", "dev1")) or "docker" in _version)
|
|
21
|
+
else ""
|
|
22
|
+
)
|
|
20
23
|
|
|
21
|
-
rest_common = {"requests", "requests_file"}
|
|
22
24
|
|
|
23
25
|
base_requirements = {
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
f"acryl-datahub[sql-parser,datahub-rest]{_self_pin}",
|
|
27
|
+
"pydantic>=2.4.0",
|
|
28
|
+
# We require Airflow 2.7.x at minimum, to be compatible with the native Airflow Openlineage provider.
|
|
29
|
+
"apache-airflow>=2.7.0,<3",
|
|
30
|
+
# We remain restrictive on the versions allowed here to prevent
|
|
31
|
+
# us from being broken by backwards-incompatible changes in the
|
|
32
|
+
# underlying package.
|
|
33
|
+
"openlineage-airflow>=1.2.0,<=1.30.1",
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
plugins: Dict[str, Set[str]] = {
|
|
@@ -40,28 +43,21 @@ plugins: Dict[str, Set[str]] = {
|
|
|
40
43
|
"datahub-file": {
|
|
41
44
|
f"acryl-datahub[sync-file-emitter]{_self_pin}",
|
|
42
45
|
},
|
|
43
|
-
"plugin-v1": set(),
|
|
44
|
-
"plugin-v2": {
|
|
45
|
-
# The v2 plugin requires Python 3.8+.
|
|
46
|
-
f"acryl-datahub[sql-parser]{_self_pin}",
|
|
47
|
-
"openlineage-airflow==1.2.0; python_version >= '3.8'",
|
|
48
|
-
},
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
#
|
|
48
|
+
# Require some plugins by default.
|
|
52
49
|
base_requirements.update(plugins["datahub-rest"])
|
|
53
50
|
|
|
54
51
|
|
|
55
52
|
mypy_stubs = {
|
|
56
53
|
"types-dataclasses",
|
|
57
54
|
"sqlalchemy-stubs",
|
|
58
|
-
"types-
|
|
55
|
+
"types-setuptools",
|
|
59
56
|
"types-six",
|
|
60
57
|
"types-python-dateutil",
|
|
61
58
|
"types-requests",
|
|
62
59
|
"types-toml",
|
|
63
60
|
"types-PyYAML",
|
|
64
|
-
"types-freezegun",
|
|
65
61
|
"types-cachetools",
|
|
66
62
|
# versions 0.1.13 and 0.1.14 seem to have issues
|
|
67
63
|
"types-click==0.1.12",
|
|
@@ -71,48 +67,34 @@ mypy_stubs = {
|
|
|
71
67
|
dev_requirements = {
|
|
72
68
|
*base_requirements,
|
|
73
69
|
*mypy_stubs,
|
|
74
|
-
"black==22.12.0",
|
|
75
70
|
"coverage>=5.1",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"isort>=5.7.0",
|
|
79
|
-
"mypy>=1.4.0",
|
|
80
|
-
# pydantic 1.8.2 is incompatible with mypy 0.910.
|
|
81
|
-
# See https://github.com/samuelcolvin/pydantic/pull/3175#issuecomment-995382910.
|
|
82
|
-
"pydantic>=1.10",
|
|
71
|
+
"mypy==1.17.1",
|
|
72
|
+
"ruff==0.11.7",
|
|
83
73
|
"pytest>=6.2.2",
|
|
84
|
-
"pytest-asyncio>=0.16.0",
|
|
85
74
|
"pytest-cov>=2.8.1",
|
|
86
75
|
"tox",
|
|
87
|
-
"
|
|
76
|
+
"tox-uv",
|
|
77
|
+
# Missing numpy requirement in 8.0.0
|
|
78
|
+
"deepdiff!=8.0.0",
|
|
88
79
|
"tenacity",
|
|
89
|
-
"requests-mock",
|
|
90
|
-
"freezegun",
|
|
91
|
-
"jsonpickle",
|
|
92
80
|
"build",
|
|
93
81
|
"twine",
|
|
94
82
|
"packaging",
|
|
95
83
|
}
|
|
96
84
|
|
|
97
85
|
integration_test_requirements = {
|
|
98
|
-
*dev_requirements,
|
|
99
86
|
*plugins["datahub-file"],
|
|
100
87
|
*plugins["datahub-kafka"],
|
|
101
88
|
f"acryl-datahub[testing-utils]{_self_pin}",
|
|
102
89
|
# Extra requirements for loading our test dags.
|
|
103
|
-
"apache-airflow[snowflake]>=2.0.2",
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
# of splitting this into integration-test-old and integration-test-new,
|
|
112
|
-
# adding a bound to SQLAlchemy was the simplest solution.
|
|
113
|
-
"sqlalchemy<1.4.42",
|
|
114
|
-
# To avoid https://github.com/snowflakedb/snowflake-connector-python/issues/1188,
|
|
115
|
-
# we need https://github.com/snowflakedb/snowflake-connector-python/pull/1193
|
|
90
|
+
"apache-airflow[snowflake,amazon,google]>=2.0.2",
|
|
91
|
+
# A collection of issues we've encountered:
|
|
92
|
+
# - Connexion's new version breaks Airflow:
|
|
93
|
+
# See https://github.com/apache/airflow/issues/35234.
|
|
94
|
+
# - https://github.com/snowflakedb/snowflake-sqlalchemy/issues/350
|
|
95
|
+
# Eventually we want to set this to "snowflake-sqlalchemy>=1.4.3".
|
|
96
|
+
# - To avoid https://github.com/snowflakedb/snowflake-connector-python/issues/1188,
|
|
97
|
+
# we need https://github.com/snowflakedb/snowflake-connector-python/pull/1193
|
|
116
98
|
"snowflake-connector-python>=2.7.10",
|
|
117
99
|
"virtualenv", # needed by PythonVirtualenvOperator
|
|
118
100
|
"apache-airflow-providers-sqlite",
|
|
@@ -129,13 +111,13 @@ setuptools.setup(
|
|
|
129
111
|
# Package metadata.
|
|
130
112
|
name=package_metadata["__package_name__"],
|
|
131
113
|
version=_version,
|
|
132
|
-
url="https://
|
|
114
|
+
url="https://docs.datahub.com/",
|
|
133
115
|
project_urls={
|
|
134
|
-
"Documentation": "https://
|
|
116
|
+
"Documentation": "https://docs.datahub.com/docs/",
|
|
135
117
|
"Source": "https://github.com/datahub-project/datahub",
|
|
136
118
|
"Changelog": "https://github.com/datahub-project/datahub/releases",
|
|
137
119
|
},
|
|
138
|
-
license="Apache
|
|
120
|
+
license="Apache-2.0",
|
|
139
121
|
description="Datahub Airflow plugin to capture executions and send to Datahub",
|
|
140
122
|
long_description=get_long_description(),
|
|
141
123
|
long_description_content_type="text/markdown",
|
|
@@ -144,15 +126,9 @@ setuptools.setup(
|
|
|
144
126
|
"Programming Language :: Python",
|
|
145
127
|
"Programming Language :: Python :: 3",
|
|
146
128
|
"Programming Language :: Python :: 3 :: Only",
|
|
147
|
-
"Programming Language :: Python :: 3.7",
|
|
148
|
-
"Programming Language :: Python :: 3.8",
|
|
149
|
-
"Programming Language :: Python :: 3.9",
|
|
150
|
-
"Programming Language :: Python :: 3.10",
|
|
151
129
|
"Intended Audience :: Developers",
|
|
152
130
|
"Intended Audience :: Information Technology",
|
|
153
131
|
"Intended Audience :: System Administrators",
|
|
154
|
-
"License :: OSI Approved",
|
|
155
|
-
"License :: OSI Approved :: Apache Software License",
|
|
156
132
|
"Operating System :: Unix",
|
|
157
133
|
"Operating System :: POSIX :: Linux",
|
|
158
134
|
"Environment :: Console",
|
|
@@ -161,7 +137,7 @@ setuptools.setup(
|
|
|
161
137
|
],
|
|
162
138
|
# Package info.
|
|
163
139
|
zip_safe=False,
|
|
164
|
-
python_requires=">=3.
|
|
140
|
+
python_requires=">=3.9",
|
|
165
141
|
package_data={
|
|
166
142
|
"datahub_airflow_plugin": ["py.typed"],
|
|
167
143
|
},
|
|
@@ -171,6 +147,7 @@ setuptools.setup(
|
|
|
171
147
|
# Dependencies.
|
|
172
148
|
install_requires=list(base_requirements),
|
|
173
149
|
extras_require={
|
|
150
|
+
"ignore": [], # This is a dummy extra to allow for trailing commas in the list.
|
|
174
151
|
**{plugin: list(dependencies) for plugin, dependencies in plugins.items()},
|
|
175
152
|
"dev": list(dev_requirements),
|
|
176
153
|
"integration-tests": list(integration_test_requirements),
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: acryl-datahub-airflow-plugin
|
|
3
|
+
Version: 1.3.1.3
|
|
4
|
+
Summary: Datahub Airflow plugin to capture executions and send to Datahub
|
|
5
|
+
Home-page: https://docs.datahub.com/
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Documentation, https://docs.datahub.com/docs/
|
|
8
|
+
Project-URL: Source, https://github.com/datahub-project/datahub
|
|
9
|
+
Project-URL: Changelog, https://github.com/datahub-project/datahub/releases
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: Operating System :: Unix
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Environment :: Console
|
|
20
|
+
Classifier: Environment :: MacOS X
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: apache-airflow<3,>=2.7.0
|
|
25
|
+
Requires-Dist: openlineage-airflow<=1.30.1,>=1.2.0
|
|
26
|
+
Requires-Dist: acryl-datahub[datahub-rest]==1.3.1.3
|
|
27
|
+
Requires-Dist: pydantic>=2.4.0
|
|
28
|
+
Requires-Dist: acryl-datahub[datahub-rest,sql-parser]==1.3.1.3
|
|
29
|
+
Provides-Extra: ignore
|
|
30
|
+
Provides-Extra: datahub-rest
|
|
31
|
+
Requires-Dist: acryl-datahub[datahub-rest]==1.3.1.3; extra == "datahub-rest"
|
|
32
|
+
Provides-Extra: datahub-kafka
|
|
33
|
+
Requires-Dist: acryl-datahub[datahub-kafka]==1.3.1.3; extra == "datahub-kafka"
|
|
34
|
+
Provides-Extra: datahub-file
|
|
35
|
+
Requires-Dist: acryl-datahub[sync-file-emitter]==1.3.1.3; extra == "datahub-file"
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: tox-uv; extra == "dev"
|
|
38
|
+
Requires-Dist: packaging; extra == "dev"
|
|
39
|
+
Requires-Dist: types-setuptools; extra == "dev"
|
|
40
|
+
Requires-Dist: acryl-datahub[datahub-rest,sql-parser]==1.3.1.3; extra == "dev"
|
|
41
|
+
Requires-Dist: types-toml; extra == "dev"
|
|
42
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
43
|
+
Requires-Dist: types-click==0.1.12; extra == "dev"
|
|
44
|
+
Requires-Dist: mypy==1.17.1; extra == "dev"
|
|
45
|
+
Requires-Dist: deepdiff!=8.0.0; extra == "dev"
|
|
46
|
+
Requires-Dist: types-cachetools; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest-cov>=2.8.1; extra == "dev"
|
|
48
|
+
Requires-Dist: tox; extra == "dev"
|
|
49
|
+
Requires-Dist: types-python-dateutil; extra == "dev"
|
|
50
|
+
Requires-Dist: types-six; extra == "dev"
|
|
51
|
+
Requires-Dist: tenacity; extra == "dev"
|
|
52
|
+
Requires-Dist: types-requests; extra == "dev"
|
|
53
|
+
Requires-Dist: acryl-datahub[datahub-rest]==1.3.1.3; extra == "dev"
|
|
54
|
+
Requires-Dist: sqlalchemy-stubs; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest>=6.2.2; extra == "dev"
|
|
56
|
+
Requires-Dist: build; extra == "dev"
|
|
57
|
+
Requires-Dist: types-tabulate; extra == "dev"
|
|
58
|
+
Requires-Dist: apache-airflow<3,>=2.7.0; extra == "dev"
|
|
59
|
+
Requires-Dist: types-dataclasses; extra == "dev"
|
|
60
|
+
Requires-Dist: pydantic>=2.4.0; extra == "dev"
|
|
61
|
+
Requires-Dist: twine; extra == "dev"
|
|
62
|
+
Requires-Dist: coverage>=5.1; extra == "dev"
|
|
63
|
+
Requires-Dist: openlineage-airflow<=1.30.1,>=1.2.0; extra == "dev"
|
|
64
|
+
Requires-Dist: ruff==0.11.7; extra == "dev"
|
|
65
|
+
Provides-Extra: integration-tests
|
|
66
|
+
Requires-Dist: acryl-datahub[datahub-kafka]==1.3.1.3; extra == "integration-tests"
|
|
67
|
+
Requires-Dist: snowflake-connector-python>=2.7.10; extra == "integration-tests"
|
|
68
|
+
Requires-Dist: virtualenv; extra == "integration-tests"
|
|
69
|
+
Requires-Dist: acryl-datahub[sync-file-emitter]==1.3.1.3; extra == "integration-tests"
|
|
70
|
+
Requires-Dist: acryl-datahub[testing-utils]==1.3.1.3; extra == "integration-tests"
|
|
71
|
+
Requires-Dist: apache-airflow[amazon,google,snowflake]>=2.0.2; extra == "integration-tests"
|
|
72
|
+
Requires-Dist: apache-airflow-providers-sqlite; extra == "integration-tests"
|
|
73
|
+
Dynamic: classifier
|
|
74
|
+
Dynamic: description
|
|
75
|
+
Dynamic: description-content-type
|
|
76
|
+
Dynamic: home-page
|
|
77
|
+
Dynamic: license
|
|
78
|
+
Dynamic: project-url
|
|
79
|
+
Dynamic: provides-extra
|
|
80
|
+
Dynamic: requires-dist
|
|
81
|
+
Dynamic: requires-python
|
|
82
|
+
Dynamic: summary
|
|
83
|
+
|
|
84
|
+
# Datahub Airflow Plugin
|
|
85
|
+
|
|
86
|
+
See [the DataHub Airflow docs](https://docs.datahub.com/docs/lineage/airflow) for details.
|
|
87
|
+
|
|
88
|
+
## Developing
|
|
89
|
+
|
|
90
|
+
See the [developing docs](../../metadata-ingestion/developing.md).
|
|
@@ -10,21 +10,20 @@ src/acryl_datahub_airflow_plugin.egg-info/not-zip-safe
|
|
|
10
10
|
src/acryl_datahub_airflow_plugin.egg-info/requires.txt
|
|
11
11
|
src/acryl_datahub_airflow_plugin.egg-info/top_level.txt
|
|
12
12
|
src/datahub_airflow_plugin/__init__.py
|
|
13
|
-
src/datahub_airflow_plugin/_airflow_compat.py
|
|
14
13
|
src/datahub_airflow_plugin/_airflow_shims.py
|
|
15
14
|
src/datahub_airflow_plugin/_config.py
|
|
16
|
-
src/datahub_airflow_plugin/_datahub_listener_module.py
|
|
17
15
|
src/datahub_airflow_plugin/_datahub_ol_adapter.py
|
|
18
16
|
src/datahub_airflow_plugin/_extractors.py
|
|
17
|
+
src/datahub_airflow_plugin/_version.py
|
|
19
18
|
src/datahub_airflow_plugin/datahub_listener.py
|
|
20
19
|
src/datahub_airflow_plugin/datahub_plugin.py
|
|
21
|
-
src/datahub_airflow_plugin/datahub_plugin_v22.py
|
|
22
20
|
src/datahub_airflow_plugin/entities.py
|
|
23
21
|
src/datahub_airflow_plugin/py.typed
|
|
24
22
|
src/datahub_airflow_plugin/client/__init__.py
|
|
25
23
|
src/datahub_airflow_plugin/client/airflow_generator.py
|
|
26
24
|
src/datahub_airflow_plugin/example_dags/__init__.py
|
|
27
25
|
src/datahub_airflow_plugin/example_dags/generic_recipe_sample_dag.py
|
|
26
|
+
src/datahub_airflow_plugin/example_dags/graph_usage_sample_dag.py
|
|
28
27
|
src/datahub_airflow_plugin/example_dags/lineage_backend_demo.py
|
|
29
28
|
src/datahub_airflow_plugin/example_dags/lineage_backend_taskflow_demo.py
|
|
30
29
|
src/datahub_airflow_plugin/example_dags/lineage_emission_dag.py
|
|
@@ -32,9 +31,6 @@ src/datahub_airflow_plugin/example_dags/mysql_sample_dag.py
|
|
|
32
31
|
src/datahub_airflow_plugin/example_dags/snowflake_sample_dag.py
|
|
33
32
|
src/datahub_airflow_plugin/hooks/__init__.py
|
|
34
33
|
src/datahub_airflow_plugin/hooks/datahub.py
|
|
35
|
-
src/datahub_airflow_plugin/lineage/__init__.py
|
|
36
|
-
src/datahub_airflow_plugin/lineage/_lineage_core.py
|
|
37
|
-
src/datahub_airflow_plugin/lineage/datahub.py
|
|
38
34
|
src/datahub_airflow_plugin/operators/__init__.py
|
|
39
35
|
src/datahub_airflow_plugin/operators/datahub.py
|
|
40
36
|
src/datahub_airflow_plugin/operators/datahub_assertion_operator.py
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
apache-airflow<3,>=2.7.0
|
|
2
|
+
openlineage-airflow<=1.30.1,>=1.2.0
|
|
3
|
+
acryl-datahub[datahub-rest]==1.3.1.3
|
|
4
|
+
pydantic>=2.4.0
|
|
5
|
+
acryl-datahub[datahub-rest,sql-parser]==1.3.1.3
|
|
6
|
+
|
|
7
|
+
[datahub-file]
|
|
8
|
+
acryl-datahub[sync-file-emitter]==1.3.1.3
|
|
9
|
+
|
|
10
|
+
[datahub-kafka]
|
|
11
|
+
acryl-datahub[datahub-kafka]==1.3.1.3
|
|
12
|
+
|
|
13
|
+
[datahub-rest]
|
|
14
|
+
acryl-datahub[datahub-rest]==1.3.1.3
|
|
15
|
+
|
|
16
|
+
[dev]
|
|
17
|
+
tox-uv
|
|
18
|
+
packaging
|
|
19
|
+
types-setuptools
|
|
20
|
+
acryl-datahub[datahub-rest,sql-parser]==1.3.1.3
|
|
21
|
+
types-toml
|
|
22
|
+
types-PyYAML
|
|
23
|
+
types-click==0.1.12
|
|
24
|
+
mypy==1.17.1
|
|
25
|
+
deepdiff!=8.0.0
|
|
26
|
+
types-cachetools
|
|
27
|
+
pytest-cov>=2.8.1
|
|
28
|
+
tox
|
|
29
|
+
types-python-dateutil
|
|
30
|
+
types-six
|
|
31
|
+
tenacity
|
|
32
|
+
types-requests
|
|
33
|
+
acryl-datahub[datahub-rest]==1.3.1.3
|
|
34
|
+
sqlalchemy-stubs
|
|
35
|
+
pytest>=6.2.2
|
|
36
|
+
build
|
|
37
|
+
types-tabulate
|
|
38
|
+
apache-airflow<3,>=2.7.0
|
|
39
|
+
types-dataclasses
|
|
40
|
+
pydantic>=2.4.0
|
|
41
|
+
twine
|
|
42
|
+
coverage>=5.1
|
|
43
|
+
openlineage-airflow<=1.30.1,>=1.2.0
|
|
44
|
+
ruff==0.11.7
|
|
45
|
+
|
|
46
|
+
[ignore]
|
|
47
|
+
|
|
48
|
+
[integration-tests]
|
|
49
|
+
acryl-datahub[datahub-kafka]==1.3.1.3
|
|
50
|
+
snowflake-connector-python>=2.7.10
|
|
51
|
+
virtualenv
|
|
52
|
+
acryl-datahub[sync-file-emitter]==1.3.1.3
|
|
53
|
+
acryl-datahub[testing-utils]==1.3.1.3
|
|
54
|
+
apache-airflow[amazon,google,snowflake]>=2.0.2
|
|
55
|
+
apache-airflow-providers-sqlite
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
__package_name__ = "acryl-datahub-airflow-plugin"
|
|
3
|
-
__version__ = "0.12.0.4"
|
|
1
|
+
from datahub_airflow_plugin._version import __package_name__, __version__
|
|
4
2
|
|
|
5
3
|
|
|
6
|
-
def
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def nice_version_name() -> str:
|
|
11
|
-
if is_dev_mode():
|
|
12
|
-
return "unavailable (installed in develop mode)"
|
|
13
|
-
return __version__
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def get_provider_info():
|
|
4
|
+
def get_provider_info() -> dict:
|
|
5
|
+
# Register our hooks with Airflow.
|
|
17
6
|
return {
|
|
18
7
|
"package-name": f"{__package_name__}",
|
|
19
8
|
"name": f"{__package_name__}",
|
|
20
|
-
"description": "
|
|
9
|
+
"description": "DataHub metadata collector plugin",
|
|
21
10
|
"connection-types": [
|
|
22
11
|
{
|
|
23
12
|
"hook-class-name": "datahub_airflow_plugin.hooks.datahub.DatahubRestHook",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
import airflow.version
|
|
4
|
+
import packaging.version
|
|
5
|
+
from airflow.models.operator import Operator
|
|
6
|
+
|
|
7
|
+
try:
|
|
8
|
+
from airflow.sensors.external_task import ExternalTaskSensor
|
|
9
|
+
except ImportError:
|
|
10
|
+
from airflow.sensors.external_task_sensor import ExternalTaskSensor # type: ignore
|
|
11
|
+
|
|
12
|
+
# Approach suggested by https://stackoverflow.com/a/11887885/5004662.
|
|
13
|
+
AIRFLOW_VERSION = packaging.version.parse(airflow.version.version)
|
|
14
|
+
HAS_AIRFLOW_DAG_LISTENER_API = True # this is in Airflow 2.5+
|
|
15
|
+
HAS_AIRFLOW_DATASET_LISTENER_API = AIRFLOW_VERSION >= packaging.version.parse(
|
|
16
|
+
"2.8.0.dev0"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_task_inlets(operator: "Operator") -> List:
|
|
21
|
+
# From Airflow 2.4 _inlets is dropped and inlets used consistently. Earlier it was not the case, so we have to stick there to _inlets
|
|
22
|
+
if hasattr(operator, "_inlets"):
|
|
23
|
+
return operator._inlets # type: ignore[attr-defined, union-attr]
|
|
24
|
+
if hasattr(operator, "get_inlet_defs"):
|
|
25
|
+
return operator.get_inlet_defs() # type: ignore[attr-defined]
|
|
26
|
+
return operator.inlets or []
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_task_outlets(operator: "Operator") -> List:
|
|
30
|
+
# From Airflow 2.4 _outlets is dropped and inlets used consistently. Earlier it was not the case, so we have to stick there to _outlets
|
|
31
|
+
# We have to use _outlets because outlets is empty in Airflow < 2.4.0
|
|
32
|
+
if hasattr(operator, "_outlets"):
|
|
33
|
+
return operator._outlets # type: ignore[attr-defined, union-attr]
|
|
34
|
+
if hasattr(operator, "get_outlet_defs"):
|
|
35
|
+
return operator.get_outlet_defs()
|
|
36
|
+
return operator.outlets or []
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"AIRFLOW_VERSION",
|
|
41
|
+
"ExternalTaskSensor",
|
|
42
|
+
]
|