mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 08:50:18 +00:00
issue-9734: job-id-param-added-for-dbt-cloud-ingestion (#10248)
UI changes will be handled with https://github.com/open-metadata/OpenMetadata/issues/10269
This commit is contained in:
parent
cae284d8d7
commit
c678b54b05
@ -9,6 +9,8 @@ source:
|
||||
# # For cloud
|
||||
# dbtCloudAuthToken: token
|
||||
# dbtCloudAccountId: ID
|
||||
# dbtCloudJobId: JOB ID
|
||||
# dbtCloudUrl: https://cloud.getdbt.com
|
||||
# # For Local
|
||||
# dbtCatalogFilePath: path-to-catalog.json
|
||||
# dbtManifestFilePath: path-to-manifest.json
|
||||
|
@ -172,12 +172,17 @@ def _(config: DbtCloudConfig): # pylint: disable=too-many-locals
|
||||
client = REST(client_config)
|
||||
account_id = config.dbtCloudAccountId
|
||||
project_id = config.dbtCloudProjectId
|
||||
job_id = config.dbtCloudJobId
|
||||
logger.debug(
|
||||
"Requesting [dbt_catalog], [dbt_manifest] and [dbt_run_results] data"
|
||||
)
|
||||
params_data = {"order_by": "-finished_at", "limit": "1", "status": "10"}
|
||||
if project_id:
|
||||
params_data["project_id"] = project_id
|
||||
|
||||
if job_id:
|
||||
params_data["job_definition_id"] = job_id
|
||||
|
||||
response = client.get(f"/accounts/{account_id}/runs", data=params_data)
|
||||
runs_data = response.get("data")
|
||||
if runs_data:
|
||||
|
@ -22,6 +22,11 @@
|
||||
"description": "In case of multiple projects in a dbt cloud account, specify the project's id from which you want to extract the dbt run artifacts",
|
||||
"type": "string"
|
||||
},
|
||||
"dbtCloudJobId": {
|
||||
"title": "dbt Cloud Job Id",
|
||||
"description": "dbt cloud job id.",
|
||||
"type": "string"
|
||||
},
|
||||
"dbtCloudUrl": {
|
||||
"title": "dbt Cloud URL",
|
||||
"description": "URL to connect to your dbt cloud instance. E.g., https://cloud.getdbt.com or https://emea.dbt.com/",
|
||||
|
Loading…
x
Reference in New Issue
Block a user