my_bundle/├── databuddy.yml # Bundle main configuration file (required)├── resources/ # Resource definition directory│ └── workflow/ # Workflow resource subdirectory│ └── workflow_a.yml├── src/ # Source code directory│ ├── task_a.sql│ └── task_b.sql└── README.md # Project description
databuddy.yml is the entry configuration file of a Bundle, defining its basic information, environment configurations, and variables.# Basic Bundle configurationbundle:name: my_bundleuuid: a97c467e-xxxx-xxxx-xxxx-525400694f7c# Import resource filesinclude:- resources/workflow/*.yml# Global variable definitionsvariables:scheduling_resource_group:description: resource_group_name# Multi-environment configurationtargets:dev:mode: developmentdefault: truevariables:scheduling_resource_group: dev_resource_groupworkspace:host: https://databuddy.cloud.tencent.com/workbench?o=<workspace_id>&r=<region_id>prod:mode: productionvariables:scheduling_resource_group: prod_resource_groupworkspace:host: https://databuddy.cloud.tencent.com/workbench?o=<workspace_id>&r=<region_id>staging:mode: productionvariables:scheduling_resource_group: staging_resource_groupworkspace:host: https://databuddy.cloud.tencent.com/workbench?o=<workspace_id>&r=<region_id>
Parameter | Description | Required | Default Value |
name | Bundle project name, used to identify the project. | Yes | - |
uuid | Bundle unique identifier, automatically generated during databuddy bundle init | Yes (automatic) | Automatically generated |
wedata_cli_version | Minimum required databuddy CLI version | No | No limit |
include:- resources/workflow/*.yml # Matches all yml files under resources/workflow/
${var.<variable_name>} to reference them.Parameter | Description | Required |
description | Variable Description | No |
default | Default Value | No |
type | Variable Type (string) | No |
Parameter | Description | Required | Default Value |
mode | Deployment mode: development or production | No | development |
default | Whether it is the default Target (used when -t is not specified) | No | false |
variables | Environment-level variable override | No | — |
workspace.host | Target Workspace address | Yes | — |
workspace.root_path | Storage path of Bundle files in Studio | No | .bundle/<name>/<target> |
permissions | Permission configuration for deployed resources | No | Profile user has CAN_MANAGE permission. |
Action | development | production |
Workflow name prefix | Automatically add the dev_<username>_ prefix. | No prefix |
File path | Points to .bundle/<name>/dev/files/ | Points to the reference path in the task configuration. |
root_path limit | Must be under the personal folder (starting with ~/). | No limit. Specify an independent path is recommended. |
root_path must start with ~/ or contain the current username. Otherwise, deploy reports an error: [Error] root path must start with '~/' or contain the current username to ensure uniqueness when 'mode: development' is usedParameter | Description | Value |
user_name | User Account | Email format |
level | Permission Level | CAN_VIEW / CAN_RUN / CAN_MANAGE / IS_OWNER |
resources/workflow/ directory to define the workflows in a Bundle and the tasks they contain.resources/workflow/workflow_a.yml). The task_type and task_type_property_list fields vary by task type (such as SQL, Shell, and Python). This example uses only SQL tasks:resources:workflows:workflow_a:name: workflow_aexecute_user: <your_username>trigger:- scheduler_status: ACTIVEtrigger_mode: TIME_TRIGGERscheduler_time_zone: Asia/Shanghaistart_time: "2026-06-01 00:00:00"end_time: "2099-12-31 23:59:59"config_mode: COMMONcycle_type: DAY_CYCLEcrontab_expression: 0 0 2 * * ? *advance_config:queuing_mode: "OFF"max_concurrent_num: 1task_list:- task_name: task_afile_path: ../../src/task/task_a.sqlremote_dir_path: /Workspace/task_a.sqlresource_group_name: ${var.scheduling_resource_group}depend_on_run_condition: ALL_SUCCESStask_type:task_type_name: SQLtask_type_property_list:- property_key: Sourceproperty_value: WorkSpace- property_key: SqlPathproperty_value: /Workspace/task_a.sql- property_key: CodeFileNameproperty_value: task_a.sqlparam_list:- param_key: bizdateparam_value: '{{workflow.trigger.time.iso_date}}'task_retry_strategy:max_retry_time: 3retry_between_wait_time: 5retry_between_wait_time_unit: SECONDtask_run_failure_retry_switch: true- task_name: task_bfile_path: ../../src/task/task_b.sqlremote_dir_path: /Workspace/task_b.sqlresource_group_name: ${var.scheduling_resource_group}depend_on_run_condition: ALL_SUCCESStask_type:task_type_name: SQLtask_type_property_list:- property_key: Sourceproperty_value: WorkSpace- property_key: SqlPathproperty_value: /Workspace/task_b.sql- property_key: CodeFileNameproperty_value: task_b.sqlparam_list:- param_key: bizdateparam_value: "1"depend_on_list:- task_name: task_atask_retry_strategy:max_retry_time: 3retry_between_wait_time: 5retry_between_wait_time_unit: SECONDtask_run_failure_retry_switch: true
src/task/ directory, for example, src/task/task_a.sql:INSERT OVERWRITE TABLE target_schema.table_a PARTITION(dt = '${bizdate}')SELECT col_1,col_2,COALESCE(col_3, 0) AS col_3,col_4FROM source_schema.table_bWHERE dt = '${bizdate}'AND col_1 IS NOT NULL
Parameter | Description | Required | Default Value |
name | Workflow name | Yes | — |
execute_user | Execution user | No | Current Profile User |
trigger | Trigger configuration (scheduling rules) | No | Scheduling Disabled |
advance_config | Advanced configuration (queuing mode and concurrency) | No | — |
task_list | Task list | Yes | — |
Parameter | Description | Required | Default Value |
task_name | Task Name | Yes | — |
file_path | Relative path of the local code file | Yes | — |
remote_dir_path | Remote storage path | Yes | — |
resource_group_name | Execution resource group name, supporting variable references | Yes | — |
depend_on_run_condition | Dependency run condition ( ALL_SUCCESS, and so on) | No | ALL_SUCCESS |
task_type | Task type configuration | Yes | — |
task_type.task_type_name | Task type name ( SQL / Python / Notebook, and so on) | Yes | — |
task_type.task_type_property_list | Task type property list | No | — |
param_list | Parameter list | No | — |
depend_on_list | List of dependent upstream tasks | No | — |
task_retry_strategy | Retry Policy | No | — |
Parameter | Description | Required | Default Value |
scheduler_status | Scheduling status ( ACTIVE / INACTIVE) | No | INACTIVE |
trigger_mode | Trigger mode ( TIME_TRIGGER) | No | — |
scheduler_time_zone | Scheduling Time Zone | No | Asia/Shanghai |
start_time | Scheduling Effective Start Time | No | — |
end_time | Scheduling Effective End Time | No | — |
config_mode | Configuration mode ( COMMON) | No | — |
cycle_type | Cycle type ( DAY_CYCLE / HOUR_CYCLE, and so on) | No | — |
crontab_expression | Cron expression | No | — |
databuddy.yml in resource configurations by using ${var.<variable_name>}, for example:resource_group_name: ${var.scheduling_resource_group}
databuddy.yml. Otherwise, the CLI cannot identify the Bundle root directory.include path supports the wildcard *, but does not support the recursive wildcard **.root_path must be a personal path.dev_<username>_<original_name>.uuid is automatically generated during databuddy bundle init. If a manually created project lacks a uuid, an error [ERROR] bundle id not defined is reported when databuddy bundle validate is run. It is recommended to create the project by using the init command.variables, and then override them in different Targets:variables:scheduling_resource_group:description: resource_group_nametargets:dev:variables:scheduling_resource_group: dev_resource_groupprod:variables:scheduling_resource_group: prod_resource_group
databuddy bundle validate or deploy is run: [ERROR] There is no resource yml file defined in bundle. Ensure that at least one yml file exists in subdirectories such as resources/workflow/.Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários