Skip to content

Commit b08db32

Browse files
committed
fix: integration id
1 parent 285fc83 commit b08db32

File tree

1 file changed

+19
-13
lines changed
  • src/datapilot/core/platforms/dbt/cli

1 file changed

+19
-13
lines changed

src/datapilot/core/platforms/dbt/cli/cli.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,29 @@ def project_health(
133133
@dbt.command("onboard")
134134
@click.option("--token", prompt="API Token", help="Your API token for authentication.")
135135
@click.option("--instance-name", prompt="Instance Name", help="Your tenant ID.")
136-
@click.option("--dbt_core_integration_id", prompt="DBT Core Integration ID", help="DBT Core Integration ID")
137136
@click.option(
138-
"--dbt_core_integration_environment", default="PROD", prompt="DBT Core Integration Environment", help="DBT Core Integration Environment"
137+
"--dbt_core_integration_id",
138+
"--dbt_integration_id",
139+
"dbt_integration_id", # This is the parameter name that will be passed to the function
140+
prompt="DBT Integration ID",
141+
help="DBT Core Integration ID or DBT Integration ID",
142+
)
143+
@click.option(
144+
"--dbt_core_integration_environment",
145+
"--dbt_integration_environment",
146+
"dbt_integration_environment", # This is the parameter name that will be passed to the function
147+
default="PROD",
148+
prompt="DBT Integration Environment",
149+
help="DBT Core Integration Environment or DBT Integration Environment",
139150
)
140151
@click.option("--manifest-path", required=True, prompt="Manifest Path", help="Path to the manifest file.")
141152
@click.option("--catalog-path", required=False, prompt=False, help="Path to the catalog file.")
142153
@click.option("--backend-url", required=False, help="Altimate's Backend URL", default="https://api.myaltimate.com")
143154
def onboard(
144155
token,
145156
instance_name,
146-
dbt_core_integration_id,
147-
dbt_core_integration_environment,
157+
dbt_integration_id, # Updated parameter name
158+
dbt_integration_environment, # Updated parameter name
148159
manifest_path,
149160
catalog_path,
150161
backend_url="https://api.myaltimate.com",
@@ -160,16 +171,13 @@ def onboard(
160171
click.echo("Error: You don't have permission to perform this action.")
161172
return
162173

163-
# This will throw error if manifest file is incorrect
164174
try:
165175
load_manifest(manifest_path)
166176
except Exception as e:
167177
click.echo(f"Error: {e}")
168178
return
169179

170-
response = onboard_file(
171-
token, instance_name, dbt_core_integration_id, dbt_core_integration_environment, "manifest", manifest_path, backend_url
172-
)
180+
response = onboard_file(token, instance_name, dbt_integration_id, dbt_integration_environment, "manifest", manifest_path, backend_url)
173181
if response["ok"]:
174182
click.echo("Manifest onboarded successfully!")
175183
else:
@@ -178,21 +186,19 @@ def onboard(
178186
if not catalog_path:
179187
return
180188

181-
response = onboard_file(
182-
token, instance_name, dbt_core_integration_id, dbt_core_integration_environment, "catalog", catalog_path, backend_url
183-
)
189+
response = onboard_file(token, instance_name, dbt_integration_id, dbt_integration_environment, "catalog", catalog_path, backend_url)
184190
if response["ok"]:
185191
click.echo("Catalog onboarded successfully!")
186192
else:
187193
click.echo(f"{response['message']}")
188194

189-
response = start_dbt_ingestion(token, instance_name, dbt_core_integration_id, dbt_core_integration_environment, backend_url)
195+
response = start_dbt_ingestion(token, instance_name, dbt_integration_id, dbt_integration_environment, backend_url)
190196
if response["ok"]:
191197
url = map_url_to_instance(backend_url, instance_name)
192198
if not url:
193199
click.echo("Manifest and catalog ingestion has started.")
194200
else:
195-
url = f"{url}/settings/integrations/{dbt_core_integration_id}/{dbt_core_integration_environment}"
201+
url = f"{url}/settings/integrations/{dbt_integration_id}/{dbt_integration_environment}"
196202
click.echo(f"Manifest and catalog ingestion has started. You can check the status at {url}")
197203
else:
198204
click.echo(f"{response['message']}")

0 commit comments

Comments
 (0)