From b08db32476c1940baa2c872a57a847d698375cce Mon Sep 17 00:00:00 2001 From: suryaiyer95 Date: Tue, 27 May 2025 19:12:20 -0700 Subject: [PATCH 1/2] fix: integration id --- src/datapilot/core/platforms/dbt/cli/cli.py | 32 ++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/datapilot/core/platforms/dbt/cli/cli.py b/src/datapilot/core/platforms/dbt/cli/cli.py index 8472ebf..0ecde77 100644 --- a/src/datapilot/core/platforms/dbt/cli/cli.py +++ b/src/datapilot/core/platforms/dbt/cli/cli.py @@ -133,9 +133,20 @@ def project_health( @dbt.command("onboard") @click.option("--token", prompt="API Token", help="Your API token for authentication.") @click.option("--instance-name", prompt="Instance Name", help="Your tenant ID.") -@click.option("--dbt_core_integration_id", prompt="DBT Core Integration ID", help="DBT Core Integration ID") @click.option( - "--dbt_core_integration_environment", default="PROD", prompt="DBT Core Integration Environment", help="DBT Core Integration Environment" + "--dbt_core_integration_id", + "--dbt_integration_id", + "dbt_integration_id", # This is the parameter name that will be passed to the function + prompt="DBT Integration ID", + help="DBT Core Integration ID or DBT Integration ID", +) +@click.option( + "--dbt_core_integration_environment", + "--dbt_integration_environment", + "dbt_integration_environment", # This is the parameter name that will be passed to the function + default="PROD", + prompt="DBT Integration Environment", + help="DBT Core Integration Environment or DBT Integration Environment", ) @click.option("--manifest-path", required=True, prompt="Manifest Path", help="Path to the manifest file.") @click.option("--catalog-path", required=False, prompt=False, help="Path to the catalog file.") @@ -143,8 +154,8 @@ def project_health( def onboard( token, instance_name, - dbt_core_integration_id, - dbt_core_integration_environment, + dbt_integration_id, # Updated parameter name + dbt_integration_environment, # Updated parameter name manifest_path, catalog_path, backend_url="https://api.myaltimate.com", @@ -160,16 +171,13 @@ def onboard( click.echo("Error: You don't have permission to perform this action.") return - # This will throw error if manifest file is incorrect try: load_manifest(manifest_path) except Exception as e: click.echo(f"Error: {e}") return - response = onboard_file( - token, instance_name, dbt_core_integration_id, dbt_core_integration_environment, "manifest", manifest_path, backend_url - ) + response = onboard_file(token, instance_name, dbt_integration_id, dbt_integration_environment, "manifest", manifest_path, backend_url) if response["ok"]: click.echo("Manifest onboarded successfully!") else: @@ -178,21 +186,19 @@ def onboard( if not catalog_path: return - response = onboard_file( - token, instance_name, dbt_core_integration_id, dbt_core_integration_environment, "catalog", catalog_path, backend_url - ) + response = onboard_file(token, instance_name, dbt_integration_id, dbt_integration_environment, "catalog", catalog_path, backend_url) if response["ok"]: click.echo("Catalog onboarded successfully!") else: click.echo(f"{response['message']}") - response = start_dbt_ingestion(token, instance_name, dbt_core_integration_id, dbt_core_integration_environment, backend_url) + response = start_dbt_ingestion(token, instance_name, dbt_integration_id, dbt_integration_environment, backend_url) if response["ok"]: url = map_url_to_instance(backend_url, instance_name) if not url: click.echo("Manifest and catalog ingestion has started.") else: - url = f"{url}/settings/integrations/{dbt_core_integration_id}/{dbt_core_integration_environment}" + url = f"{url}/settings/integrations/{dbt_integration_id}/{dbt_integration_environment}" click.echo(f"Manifest and catalog ingestion has started. You can check the status at {url}") else: click.echo(f"{response['message']}") From d45f4f3efa745ebcb9a081c8bf706192ab3fa533 Mon Sep 17 00:00:00 2001 From: suryaiyer95 Date: Thu, 12 Jun 2025 00:22:01 -0700 Subject: [PATCH 2/2] fix: merge main --- src/datapilot/core/platforms/dbt/cli/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/datapilot/core/platforms/dbt/cli/cli.py b/src/datapilot/core/platforms/dbt/cli/cli.py index 02eb964..238e522 100644 --- a/src/datapilot/core/platforms/dbt/cli/cli.py +++ b/src/datapilot/core/platforms/dbt/cli/cli.py @@ -132,7 +132,6 @@ def project_health( @dbt.command("onboard") @auth_options -@click.option("--dbt_core_integration_id", prompt="DBT Core Integration ID", help="DBT Core Integration ID") @click.option( "--dbt_core_integration_id", "--dbt_integration_id", @@ -151,7 +150,9 @@ def project_health( @click.option("--manifest-path", required=True, prompt="Manifest Path", help="Path to the manifest file.") @click.option("--catalog-path", required=False, prompt=False, help="Path to the catalog file.") def onboard( - ctx, + token, + instance_name, + backend_url, dbt_integration_id, dbt_integration_environment, manifest_path,