tencent cloud

Tencent Cloud DataBuddy

Bundle Commands

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-10-09 16:13:53
Diterjemahkan oleh AI

Overview

The databuddy CLI provides a complete set of command-line tools that cover the full lifecycle of a Bundle, from installation to termination. This document serves as a command reference and lists all supported commands and their parameter descriptions.

Installing, Uninstalling, and Upgrading

Installing a client

macOS / Linux:
curl https://wedata3-platform-bundle-cq-1257305158.cos.ap-chongqing.myqcloud.com/bundle_sh/install.sh | sudo sh
Windows:
curl.exe -fsSL https://wedata3-platform-bundle-cq-1257305158.cos.ap-chongqing.myqcloud.com/bundle_sh/install.bat -o install.bat && install.bat

Uninstalling a client

macOS / Linux:
curl https://wedata3-platform-bundle-cq-1257305158.cos.ap-chongqing.myqcloud.com/bundle_sh/install.sh | sudo sh -s -- --uninstall
Windows:
curl.exe -fsSL https://wedata3-platform-bundle-cq-1257305158.cos.ap-chongqing.myqcloud.com/bundle_sh/install.bat -o install.bat && install.bat --uninstall

Upgrading a client

macOS / Linux:
curl https://wedata3-platform-bundle-cq-1257305158.cos.ap-chongqing.myqcloud.com/bundle_sh/install.sh | sudo sh -s -- --upgrade
Windows:
curl.exe -fsSL https://wedata3-platform-bundle-cq-1257305158.cos.ap-chongqing.myqcloud.com/bundle_sh/install.bat -o install.bat && install.bat --upgrade

Viewing Versions

databuddy -v
databuddy --version

Identity Authentication

Login

databuddy auth login
databuddy auth login --host "<workspace-url>"
Parameter
Description
Required
--host
Target Workspace address
No (the address in the default Profile is used)
<workspace-url> is the full address of the target Workspace in the DataBuddy console. After logging in to the console and going to the target Workspace, copy the URL from the browser address bar, such as https://databuddy.cloud.tencent.com/workbench?o=<workspace_id>&r=<region_id>. In the URL, o is the Workspace ID and r is the region ID. Both are automatically generated by the console and do not need to be manually assembled.
Note:
<workspace-url> must be enclosed in double quotation marks. Using single quotation marks causes URL parsing to fail, and omitting quotation marks causes authentication to fail. The address must contain the o= parameter. Otherwise, the following error is displayed: workspace id is empty, 'o' param not found in URL.
When you run databuddy auth login directly, the terminal prompts you to enter the configuration name (press Enter to use the current configuration) and the Workspace address in sequence. After a successful login, the terminal displays Verification Success, and the login status remains valid for 7 days.

Logging in with a Key

This method is suitable for non-interactive scenarios such as CI/CD pipelines. Edit the ~/.databuddycfg configuration file:
[default]
host = https://databuddy.cloud.tencent.com/workbench?o=<workspace_id>&r=<region_id>
secret_id = <your_secret_id>
secret_key = <your_secret_key>
project_id = <project_id>
user_name = <user_name>
user_id = <user_id>
region = ap-singapore
is_intl = false
Note:
The key file contains sensitive information. Ensure that the file permission is set to 600 (readable and writable only by the current user).

Viewing Authentication Information

databuddy auth describe
databuddy auth describe -p <profile_name>
databuddy auth describe --host <sub_account>
databuddy auth describe --sensitive
Parameter
Description
-p
View authentication information of a specified Profile.
--host
View Profile information of a specified sub-account.
--sensitive
Output sensitive information (secret_id and secret_key). If not specified, it is displayed as ******.

Bundle Operations

Common parameters

The following parameters apply to most databuddy bundle subcommands:
Parameter
Description
-t, --target <string>
Specify the Target (such as dev / staging / prod).
-p, --profile <string>
Specify the Profile to use.
--var "<key>=<value>"
Override Bundle variables (supported for validate / deploy / summary / destroy).
--help
View command help.

Initializing a Bundle

databuddy bundle init
Interactively guides you through creating a Bundle project template. The system prompts you in sequence:
1. Select a template.
The system displays a list of built-in templates. You can use the arrow keys to select a template or enter a template name:
Template
Description
Intended Audience
SQL
Project skeleton for SQL processing tasks, including example SQL files and workflow configurations
Data development engineers who write SQL for ETL
Notebook
Project skeleton for Notebook tasks, including example ipynb files
Use Python for complex data processing.
Minimal
Minimal skeleton containing only databuddy.yml and an empty directory structure
Advanced users who want full customization
2. Configure the project.
After you select a template, the system prompts you to enter the project name and compute resource in sequence. The value in [] is the default value, and you can press Enter directly to use the default configuration. For Compute, you need to manually enter the compute resource name.
3. Complete the creation.
Example of the generated directory structure (SQL template):
yiwu_etl/
├── databuddy.yml
├── src/
│ └── sql_example.sql
├── resources/
│ └── workflow/
│ └── sql_example.yml
└── README.md
Note:
A project generated by init can run databuddy bundle deploy directly without modifying the configuration. By default, scheduling runs at 00:00 (UTC+8), and the compute resources and runtime account are configured during initialization.

Pulling Resources (generate)

databuddy bundle generate workflow --existing-workflow-id <workflow_id>
Pull the existing workflow configuration from DataBuddy to the local Bundle. workflow is the resource type, and --existing-workflow-id specifies the ID of the workflow to pull.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.

Binding Resources (bind)

databuddy bundle deployment bind workflow <resource_key> <workflow_id>
Bind an existing online workflow to the resource definition in the local Bundle. <resource_key> is the local resource identifier, and <workflow_id> is the online workflow ID. After binding, you can run deploy to synchronize the local configuration to the workflow.
<resource_key> is taken from the key name under resources → workflows in the local resources/workflow/*.yml file. In the following configuration, <resource_key> is workflow_a:
resources:
workflows:
workflow_a: # This key name is <resource_key>
name: workflow_a
To obtain <workflow_id>, open the target workflow in Data Engineering > Workflow in the DataBuddy console, and then get it from the address bar on the details page or from the workflow properties.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.

Unbinding (unbind)

databuddy bundle deployment unbind workflow <resource_key>
Unbind the local resource definition from the online workflow. <resource_key> is the local resource identifier.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.

Validating a Bundle (validate)

databuddy bundle validate
Validate the syntax correctness and resource reference integrity of the Bundle configuration.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.
--var
Override Bundle variables (see Variable Override (--var) in this document).

Deploying a Bundle (deploy)

databuddy bundle deploy
databuddy bundle deploy -t dev
databuddy bundle deploy -t prod -p admin_profile
databuddy bundle deploy --var="database=prod_ods"
Deploy the resources defined in the Bundle to the target environment. The deployment process runs the following steps in order: configuration validation → file upload → resource deployment. If a Warning is found during validation, the system pauses and asks whether to continue. If a resource fails to deploy, the remaining resources will still be deployed, and all failed items will be displayed together at the end.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.
--var
Override Bundle variables (see Variable Override (--var) in this document).

Running (run)

databuddy bundle run workflow <resource_key> -t dev
databuddy bundle run workflow <resource_key> --params="key1=value1" --params="key2=value2"
Trigger a one-time run of the specified workflow. <resource_key> is the resource identifier of the workflow to run.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.
--params
Specify the runtime parameter values in the key=value format. This option can be used multiple times.

Terminating (destroy)

databuddy bundle destroy
databuddy bundle destroy -t dev
Delete all resources deployed by this Bundle in the target environment (workflows + Studio files). Local Bundle files are not affected.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.
--var
Override Bundle variables.
Warning:
The destroy operation is irreversible. Before execution, the system lists the resources to be deleted and asks for confirmation.

Viewing Summary (summary)

databuddy bundle summary
databuddy bundle summary -t dev
databuddy bundle summary --var="database=prod_ods"
Display the deployment status and resource information of the current Bundle.
Flag
Description
-t, --target
Specify the Target.
-p, --profile
Specify the Profile.
--var
Override Bundle variables.

View Help

databuddy bundle --help

Variable Override (--var)

You can use the --var parameter in the command line to override variable values defined in databuddy.yml without modifying the configuration file.

Basic Syntax

databuddy bundle <command> --var="<key>=<value>" --var="<key>=<value>"
databuddy bundle <command> --var="<key>=<value>,<key>=<value>"

Supported Commands

Command
Example
validate
databuddy bundle validate --var="database=prod_ods"
deploy
databuddy bundle deploy --var="database=prod_ods"
summary
databuddy bundle summary --var="database=prod_ods"
destroy
databuddy bundle destroy --var="database=prod_ods"

Parameter Passing

# Single variable
databuddy bundle deploy --var="database=prod_ods"

# Multiple variables (use --var repeatedly)
databuddy bundle deploy --var="database=prod_ods" --var="engine=presto"

# Multiple variables (comma-separated)
databuddy bundle deploy --var="database=prod_ods,engine=presto"

Priority

The priority of variable values from high to low:
1. Values specified by the command line --var (highest)
2. Variable values in the resource configuration under resources/
3. Variable values defined in the current Target under databuddy.yml → targets
4. Global default values defined in databuddy.yml → variables (lowest)

Command Cheat Sheet

Command
Purpose
databuddy -v
View the CLI version.
databuddy auth login
Log In and Authenticate.
databuddy auth describe
View authentication configuration.
databuddy bundle init
Initialize a Bundle project (with template selection supported).
databuddy bundle generate workflow --existing-workflow-id <id>
Pull the workflow to the local environment.
databuddy bundle deployment bind workflow <key> <id>
Bind a workflow.
databuddy bundle deployment unbind workflow <key>
Unbind a workflow.
databuddy bundle validate -t <target>
Validate the Bundle configuration.
databuddy bundle deploy -t <target>
Deploy a Bundle.
databuddy bundle deploy --var="key=value"
Override variables during deployment.
databuddy bundle run workflow <key> -t <target>
Run a workflow.
databuddy bundle run workflow <key> --params="key=value"
Run a workflow with parameters.
databuddy bundle destroy -t <target>
Terminate a deployment.
databuddy bundle summary -t <target>
View the deployment summary.
databuddy bundle --help
View Help.

References

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan