./tdlc [command] --help.Operating System | TDLC Binary Packet Download Link |
Windows | |
Mac | |
Linux |
tdlc. Open the command line on your client, navigate to the download path, and if you are using Mac/Linux, use the chmod +x tdlc command to grant executable permissions to the file. After ./tdlc is executed, if the following content is displayed successfully, the installation is complete and the tool is ready for use.Tencentcloud DLC command tools is used to play around with DLC.With TDLC user can manger engines, execute SQLs and submit Spark Jobs.Usage:tdlc [flags]tdlc [command]Available Commands:confighelp Help about any commandspark Submit spark app to engines.sql Executing SQL.versionFlags:--endpoint string Endpoint of Tencentcloud account. (default "dlc.tencentcloudapi.com")--engine string DLC engine. (default "public-engine")-h, --help help for tdlc--region string Region of Tencentcloud account.--resource-group string DLC resource group name of spark engine.--role-arn string Required by spark jar app.--secret-id string SecretId of Tencentcloud account.--secret-key string SecretKey of Tencentcloud account.--token string Token of Tencentcloud account.Use "tdlc [command] --help" for more information about a command.
Global Parameters | Description |
--endpoint string | Service connection address, and dlc.tencentcloudapi.com is used by default. |
--engine string | DLC data engine name. The default value is public-engine. It is recommended to use a Dedicated Data Engine. |
--resource-group string | (Optional) Resource group name of the DLC Standard Spark engine. The default value is the default resource group default-rg-xxxx. |
--region string | Region to be used Examples: ap-nanjing, ap-beijing, ap-guangzhou, ap-shanghai, ap-chengdu, ap-chongqing, na-siliconvalley, ap-singapore, ap-hongkong |
--role-arn string | When submitting Spark jobs, you need to specify the permissions to access COS files. This involves assigning the appropriate rolearn with the required permissions. For details on the rolearn, see Configuring Data Access Policy. |
--secret-id string | Tencent Cloud account secretId |
--secret-key string | Tencent Cloud account secretKey |
--token string | (Optional) Tencent Cloud account temporary token |
Command | Note |
list | List current default configurations. |
set | Change configuration. |
unset | Reset configuration. |
./tdlc config list./tdlc config set secret-id={1} secret-key={2} region={b}./tdlc config unset region
Parameter | Note |
-e, --exec | Execute SQL statements |
-f, --file | Execute SQL files. If there are multiple SQL files, separate them with ;. Local paths and COS paths (cos://{bucket}/{key} or cosn://{bucket}/{key}) are supported. |
--no-result | Do not fetch results after execution. |
-p, --progress | Display execution progress |
-q, --quiet | Quiet mode, do not wait for task execution status after submission. |
--conf | Session configuration item in the format of key=value, can be specified multiple times. Any native Spark conf can be passed through when --submit-mode=batch-sql. |
--submit-mode | Submission channel. Options: tasks (default) or batch-sql. |
--driver-size | Driver specification. Options: small / medium / large / xlarge. For memory-optimized clusters, use m.small / m.medium / m.large / m.xlarge. Takes effect only when --submit-mode=batch-sql. |
--executor-size | Executor specification. Same values as --driver-size. Takes effect only when --submit-mode=batch-sql. |
--executor-num | Number of executors. Takes effect only when --submit-mode=batch-sql. |
--executor-max-num | Upper limit of the number of executors. Dynamic allocation is enabled when it is greater than --executor-num. Takes effect only when --submit-mode=batch-sql. |
--param | Business parameter injection in the format of key=value, can be specified multiple times. Used to replace the ${key} placeholder in SQL. |
--param-strict | Whether to enable strict mode, defaults to true. When enabled, any unreplaced ${key} placeholder in SQL causes the submission to fail directly before submission. |
--task-name | Custom task name, used by downstream systems for display and identification. Applicable to both tasks and batch-sql submission modes. If not specified, no custom task name is set. |
./tdlc sql -e "SELECT 1" --secret-id aa --secret-key bb --region ap-beijing --engine public-engine --resource-group my-rg./tdlc sql -f ~/biz.sql --no-result
./tdlc sql -f cosn://bucket/path/biz.sql./tdlc sql -e "SELECT 1" --submit-mode batch-sql --driver-size small --executor-size small --executor-num 2 --conf spark.sql.adaptive.enabled=true
Command | Description |
submit | Submit a task through spark-submit. |
run | Execute Spark jobs. |
log | View running logs. |
list | View the list of Spark jobs. |
kill | Terminate tasks |
Parameter | Note |
--driver-size | Driver specification, defaults to small, medium, large, xlarge. For memory-optimized clusters, use m.small, m.medium, m.large, m.xlarge. |
--executor-size | Executor specification, defaults to small, medium, large, xlarge. For memory-optimized clusters, use m.small, m.medium, m.large, m.xlarge. |
--executor-num | Quantities of executors |
--files | Additional dependency files to upload (excluding jar/py files), separated by commas ,. These files can be accessed directly in the working directory of the Driver/Executor at runtime. |
--archives | Dependent compressed files |
--class | Primary function run by the Java/Scala application. |
--jars | Dependent jar files, separated by the comma ,. |
--name | Application name |
--py-files | Dependent Python files, supports .zip, .egg, .py formats. |
--conf | Additional configurations |
--network | Network Configuration, such as --network "network name" |
--task-name | Custom task name, used by downstream systems for display and identification. If not specified, no custom task name is set. This parameter identifies the task for each run. It does not replace --name, which identifies the Spark application. |
./tdlc spark submit --name spark-demo1 --engine sparkjar --jars /root/sparkjar-dep.jar --class com.demo.Example /root/sparkjar-main.jar arg1./tdlc spark submit --name spark-demo2 cosn://bucket1/abc.py arg1./tdlc spark submit --name spark-demo3 --task-name daily-etl-20260730 cosn://bucket1/etl.py
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan