openmetadata-managed-apis 1.6.10.0__py3-none-any.whl → 1.10.12.0__py3-none-any.whl
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.
- openmetadata_managed_apis/__init__.py +3 -3
- openmetadata_managed_apis/api/apis_metadata.py +3 -3
- openmetadata_managed_apis/api/app.py +3 -3
- openmetadata_managed_apis/api/config.py +3 -3
- openmetadata_managed_apis/api/error_handlers.py +3 -3
- openmetadata_managed_apis/api/response.py +3 -3
- openmetadata_managed_apis/api/routes/delete.py +3 -3
- openmetadata_managed_apis/api/routes/deploy.py +3 -3
- openmetadata_managed_apis/api/routes/disable.py +3 -3
- openmetadata_managed_apis/api/routes/enable.py +3 -3
- openmetadata_managed_apis/api/routes/health.py +3 -3
- openmetadata_managed_apis/api/routes/health_auth.py +3 -3
- openmetadata_managed_apis/api/routes/ip.py +3 -3
- openmetadata_managed_apis/api/routes/kill.py +3 -3
- openmetadata_managed_apis/api/routes/last_dag_logs.py +17 -5
- openmetadata_managed_apis/api/routes/run_automation.py +4 -4
- openmetadata_managed_apis/api/routes/status.py +3 -3
- openmetadata_managed_apis/api/routes/trigger.py +11 -6
- openmetadata_managed_apis/api/utils.py +23 -3
- openmetadata_managed_apis/operations/delete.py +3 -3
- openmetadata_managed_apis/operations/deploy.py +5 -3
- openmetadata_managed_apis/operations/health.py +3 -3
- openmetadata_managed_apis/operations/kill_all.py +3 -3
- openmetadata_managed_apis/operations/last_dag_logs.py +150 -35
- openmetadata_managed_apis/operations/state.py +3 -3
- openmetadata_managed_apis/operations/status.py +3 -3
- openmetadata_managed_apis/operations/trigger.py +8 -5
- openmetadata_managed_apis/plugin.py +3 -3
- openmetadata_managed_apis/utils/parser.py +3 -3
- openmetadata_managed_apis/views/rest_api.py +3 -3
- openmetadata_managed_apis/workflows/config.py +3 -3
- openmetadata_managed_apis/workflows/ingestion/application.py +19 -10
- openmetadata_managed_apis/workflows/ingestion/auto_classification.py +16 -11
- openmetadata_managed_apis/workflows/ingestion/common.py +46 -15
- openmetadata_managed_apis/workflows/ingestion/dbt.py +4 -3
- openmetadata_managed_apis/workflows/ingestion/elasticsearch_sink.py +3 -3
- openmetadata_managed_apis/workflows/ingestion/es_reindex.py +4 -3
- openmetadata_managed_apis/workflows/ingestion/lineage.py +4 -3
- openmetadata_managed_apis/workflows/ingestion/metadata.py +4 -3
- openmetadata_managed_apis/workflows/ingestion/profiler.py +16 -11
- openmetadata_managed_apis/workflows/ingestion/registry.py +3 -3
- openmetadata_managed_apis/workflows/ingestion/test_suite.py +16 -11
- openmetadata_managed_apis/workflows/ingestion/usage.py +12 -10
- openmetadata_managed_apis/workflows/workflow_builder.py +3 -3
- openmetadata_managed_apis/workflows/workflow_factory.py +3 -3
- {openmetadata_managed_apis-1.6.10.0.dist-info → openmetadata_managed_apis-1.10.12.0.dist-info}/METADATA +10 -6
- openmetadata_managed_apis-1.10.12.0.dist-info/RECORD +62 -0
- openmetadata_managed_apis-1.6.10.0.dist-info/RECORD +0 -62
- {openmetadata_managed_apis-1.6.10.0.dist-info → openmetadata_managed_apis-1.10.12.0.dist-info}/LICENSE +0 -0
- {openmetadata_managed_apis-1.6.10.0.dist-info → openmetadata_managed_apis-1.10.12.0.dist-info}/WHEEL +0 -0
- {openmetadata_managed_apis-1.6.10.0.dist-info → openmetadata_managed_apis-1.10.12.0.dist-info}/entry_points.txt +0 -0
- {openmetadata_managed_apis-1.6.10.0.dist-info → openmetadata_managed_apis-1.10.12.0.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -16,7 +16,11 @@ from typing import Callable
|
|
|
16
16
|
|
|
17
17
|
from flask import Blueprint, Response, request
|
|
18
18
|
from openmetadata_managed_apis.api.response import ApiResponse
|
|
19
|
-
from openmetadata_managed_apis.api.utils import
|
|
19
|
+
from openmetadata_managed_apis.api.utils import (
|
|
20
|
+
get_arg_dag_id,
|
|
21
|
+
get_request_arg,
|
|
22
|
+
sanitize_task_id,
|
|
23
|
+
)
|
|
20
24
|
from openmetadata_managed_apis.operations.last_dag_logs import last_dag_logs
|
|
21
25
|
from openmetadata_managed_apis.utils.logger import routes_logger
|
|
22
26
|
|
|
@@ -45,7 +49,15 @@ def get_fn(blueprint: Blueprint) -> Callable:
|
|
|
45
49
|
"""
|
|
46
50
|
|
|
47
51
|
dag_id = get_arg_dag_id()
|
|
48
|
-
|
|
52
|
+
raw_task_id = get_request_arg(request, "task_id")
|
|
53
|
+
task_id = sanitize_task_id(raw_task_id)
|
|
54
|
+
|
|
55
|
+
if task_id is None:
|
|
56
|
+
return ApiResponse.error(
|
|
57
|
+
status=ApiResponse.STATUS_BAD_REQUEST,
|
|
58
|
+
error="Invalid or missing task_id parameter",
|
|
59
|
+
)
|
|
60
|
+
|
|
49
61
|
after = get_request_arg(request, "after", raise_missing=False)
|
|
50
62
|
|
|
51
63
|
try:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -19,7 +19,7 @@ from openmetadata_managed_apis.api.response import ApiResponse
|
|
|
19
19
|
from openmetadata_managed_apis.utils.logger import routes_logger
|
|
20
20
|
from pydantic import ValidationError
|
|
21
21
|
|
|
22
|
-
from metadata.automations.
|
|
22
|
+
from metadata.automations.execute_runner import execute
|
|
23
23
|
from metadata.ingestion.api.parser import parse_automation_workflow_gracefully
|
|
24
24
|
from metadata.utils.secrets.secrets_manager_factory import SecretsManagerFactory
|
|
25
25
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -16,7 +16,11 @@ from typing import Callable
|
|
|
16
16
|
|
|
17
17
|
from flask import Blueprint, Response, request
|
|
18
18
|
from openmetadata_managed_apis.api.response import ApiResponse
|
|
19
|
-
from openmetadata_managed_apis.api.utils import
|
|
19
|
+
from openmetadata_managed_apis.api.utils import (
|
|
20
|
+
get_request_arg,
|
|
21
|
+
get_request_conf,
|
|
22
|
+
get_request_dag_id,
|
|
23
|
+
)
|
|
20
24
|
from openmetadata_managed_apis.operations.trigger import trigger
|
|
21
25
|
from openmetadata_managed_apis.utils.logger import routes_logger
|
|
22
26
|
|
|
@@ -41,13 +45,14 @@ def get_fn(blueprint: Blueprint) -> Callable:
|
|
|
41
45
|
@security.requires_access([(permissions.ACTION_CAN_EDIT, permissions.RESOURCE_DAG)])
|
|
42
46
|
def trigger_dag() -> Response:
|
|
43
47
|
"""
|
|
44
|
-
Trigger a dag run
|
|
48
|
+
Trigger a dag run with optional configuration
|
|
45
49
|
"""
|
|
46
50
|
dag_id = get_request_dag_id()
|
|
47
51
|
|
|
48
52
|
try:
|
|
49
53
|
run_id = get_request_arg(request, "run_id", raise_missing=False)
|
|
50
|
-
|
|
54
|
+
conf = get_request_conf()
|
|
55
|
+
response = trigger(dag_id, run_id, conf=conf)
|
|
51
56
|
|
|
52
57
|
return response
|
|
53
58
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -53,6 +53,16 @@ def clean_dag_id(raw_dag_id: Optional[str]) -> Optional[str]:
|
|
|
53
53
|
return re.sub("[^0-9a-zA-Z-_]+", "_", raw_dag_id) if raw_dag_id else None
|
|
54
54
|
|
|
55
55
|
|
|
56
|
+
def sanitize_task_id(raw_task_id: Optional[str]) -> Optional[str]:
|
|
57
|
+
"""
|
|
58
|
+
Sanitize task_id to prevent path traversal attacks.
|
|
59
|
+
Only allows alphanumeric characters, dashes, and underscores.
|
|
60
|
+
:param raw_task_id: Raw task ID from user input
|
|
61
|
+
:return: Sanitized task ID safe for file path construction
|
|
62
|
+
"""
|
|
63
|
+
return re.sub("[^0-9a-zA-Z-_]+", "_", raw_task_id) if raw_task_id else None
|
|
64
|
+
|
|
65
|
+
|
|
56
66
|
def get_request_arg(req, arg, raise_missing: bool = True) -> Optional[str]:
|
|
57
67
|
"""
|
|
58
68
|
Pick up the `arg` from the flask `req`.
|
|
@@ -99,6 +109,16 @@ def get_request_dag_id() -> Optional[str]:
|
|
|
99
109
|
return clean_dag_id(raw_dag_id)
|
|
100
110
|
|
|
101
111
|
|
|
112
|
+
def get_request_conf() -> Optional[dict]:
|
|
113
|
+
"""
|
|
114
|
+
Try to fetch the conf from the JSON request. Return None if no conf is provided.
|
|
115
|
+
"""
|
|
116
|
+
try:
|
|
117
|
+
return request.get_json().get("conf")
|
|
118
|
+
except Exception:
|
|
119
|
+
return None
|
|
120
|
+
|
|
121
|
+
|
|
102
122
|
def get_dagbag():
|
|
103
123
|
"""
|
|
104
124
|
Load the dagbag from Airflow settings
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -97,6 +97,8 @@ class DagDeployer:
|
|
|
97
97
|
Store the airflow pipeline config in a JSON file and
|
|
98
98
|
return the path for the Jinja rendering.
|
|
99
99
|
"""
|
|
100
|
+
# Create directory if it doesn't exist
|
|
101
|
+
dag_config_file_path.parent.mkdir(parents=True, exist_ok=True)
|
|
100
102
|
|
|
101
103
|
logger.info(f"Saving file to {dag_config_file_path}")
|
|
102
104
|
with open(dag_config_file_path, "w") as outfile:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright
|
|
2
|
-
# Licensed under the
|
|
1
|
+
# Copyright 2025 Collate
|
|
2
|
+
# Licensed under the Collate Community License, Version 1.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License.
|
|
4
4
|
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
5
|
+
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
|
|
6
6
|
# Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
8
8
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|