tencent cloud

Tencent Cloud WeData

Release Notes
Dynamic Release Record (2026)
Product Introduction
Product Overview
Product Advantages
Product Architecture
Product Features
Application Scenarios
Purchase Guide
Billing Overview
Product Version Purchase Instructions
Execute Resource Purchase Description
Billing Modes
Overdue Policy
Refund
Preparations
Overview of Account and Permission Management
Add allowlist /security groups (Optional)
Sign in to WeData with Microsoft Entra ID (Azure AD) Single Sign-On (SSO)
Operation Guide
Console Operation
Project Management
Data Integration
Studio
Data Development
Data Analysis
Data Science
Data Governance (with Unity Semantics)
API Documentation
History
Introduction
API Category
Making API Requests
Smart Ops Related Interfaces
Project Management APIs
Resource Group APIs
Data Development APIs
Data Asset - Data Dictionary APIs
Data Development APIs
Ops Center APIs
Data Operations Related Interfaces
Data Exploration APIs
Asset APIs
Metadata Related Interfaces
Task Operations APIs
Data Security APIs
Instance Operation and Maintenance Related Interfaces
Data Map and Data Dictionary APIs
Data Quality Related Interfaces
DataInLong APIs
Platform Management APIs
Data Source Management APIs
Data Quality APIs
Platform Management APIs
Asset Data APIs
Data Source Management APIs
Data Types
Error Codes
WeData API 2025-08-06
Service Level Agreements
Related Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

DLC SQL

PDF
Focus Mode
Font Size
Last updated: 2026-02-27 17:11:16
Note:
Need to bind the DLC engine. Currently supports Spark SQL, Spark job, and Presto engines. For engine kernel details, see DLC Engine Kernel Version.
1. Currently, users need corresponding DLC computational resources and table privileges.
2. The corresponding database tables are already in DLC.

Feature Description

Submit a DLC SQL task execution to the WeData workflow scheduling platform. When selecting the DLC data source type, it provides "advanced setting" and supports configuration of Presto and SparkSQL parameters.

When using the Spark job engine, you can configure job resource specifications and parameters. Resource configuration must not exceed the limits of the computational resources themselves.

Configuration Description:
Configuration Item
Description
Resource Configuration Method
Divided into two methods: cluster default configuration and custom configuration
1. Use cluster default configuration
Use the current task computational resource cluster configuration
2. Customize
User customizes Executor and Driver configurations.
Executor resource
Enter the required resource count. 1 cu is roughly equivalent to 1 core CPU and 4 GB memory.
1. Small: A single calculation unit (1 cu)
2. Medium: Two calculation units (2 cu)
3. Large: Four calculation units (4 cu)
4. Xlarge: Eight calculation units (8 cu)
Number of Executors
An Executor is a compute node or compute instance responsible for executing tasks and handling computing work. The resources used by each Executor are the configured number of resources.
Driver resources
Enter the required number of Driver resources. 1 cu is roughly equivalent to 1 core CPU and 4 GB memory.
1. Small: A single calculation unit (1 cu)
2. Medium: Two calculation units (2 cu)
3. Large: Four calculation units (4 cu).
4. Xlarge: Eight calculation units (8 cu).

Sample Code

-- Create a user information table
create table if not exists wedata_demo_db.user_info (
user_id string COMMENT 'User ID'
user_name string COMMENT 'username'
user_age int COMMENT 'age'
city string COMMENT 'City'
) COMMENT 'User information table';

-- Insert data into the user information table
insert into wedata_demo_db.user_info values ('001', 'Zhang San', 28, 'beijing');
insert into wedata_demo_db.user_info values ('002', 'Li Si', 35, 'shanghai');
insert into wedata_demo_db.user_info values ('003', 'Wang Wu', 22, 'shenzhen');
insert into wedata_demo_db.user_info values ('004', 'Zhao Liu', 45, 'guangzhou');
insert into wedata_demo_db.user_info values ('005', 'Xiao Ming', 20, 'beijing');
insert into wedata_demo_db.user_info values ('006', 'Xiao Hong', 30, 'shanghai');
insert into wedata_demo_db.user_info values ('007', 'Xiao Gang', 25, 'shenzhen');
insert into wedata_demo_db.user_info values ('008', 'Xiao Li', 40, 'guangzhou');
insert into wedata_demo_db.user_info values ('009', 'Xiao Zhang', 23, 'beijing');
insert into wedata_demo_db.user_info values ('010', 'Xiao Wang', 50, 'shanghai');

select * from wedata_demo_db.user_info;
Note:
When using an Iceberg external table, SQL syntax differs from that of a native Iceberg table. For details, see DLC Iceberg External Table and Native Table Statement Differences.

Presto Engine Example Code

Applicable table types: native Iceberg tables, external Iceberg tables.
CREATE TABLE `cpt_demo`.`dempts` (
id bigint COMMENT 'id number',
num int,
eno float,
dno double,
cno decimal(9,3),
flag boolean,
data string,
ts_year timestamp,
date_month date,
bno binary,
point struct<x: double, y: double>,
points array<struct<x: double, y: double>>,
pointmaps map<struct<x: int>, struct<a: int>>
)
COMMENT 'table documentation'
PARTITIONED BY (bucket(16, id), years(ts_year), months(date_month), identity(bno), bucket(3, num), truncate(10, data));

SparkSQL Engine Example Code

Applicable table types: native Iceberg tables, external Iceberg tables.
CREATE TABLE `cpt_demo`.`dempts` (
id bigint COMMENT 'id number',
num int,
eno float,
dno double,
cno decimal(9,3),
flag boolean,
data string,
ts_year timestamp,
date_month date,
bno binary,
point struct<x: double, y: double>,
points array<struct<x: double, y: double>>,
pointmaps map<struct<x: int>, struct<a: int>>
)
COMMENT 'table documentation'
PARTITIONED BY (bucket(16, id), years(ts_year), months(date_month), identity(bno), bucket(3, num), truncate(10, data));

SparkSQL Job Engine Example Code

Applicable table types: native Iceberg tables, external Iceberg tables.
CREATE TABLE `cpt_demo`.`dempts` (
id bigint COMMENT 'id number',
num int,
eno float,
dno double,
cno decimal(9,3),
flag boolean,
data string,
ts_year timestamp,
date_month date,
bno binary,
point struct<x: double, y: double>,
points array<struct<x: double, y: double>>,
pointmaps map<struct<x: int>, struct<a: int>>
)
COMMENT 'table documentation'
PARTITIONED BY (id, ts_year, date_month);
Notes:
For more DLC grammar, please refer to Data Lake Compute (DLC) SQL Syntax Overview.

Execution Result and View Details

Operation completed. View runtime results and logs below.

For DLC SQL, DLC Spark, and DLC PySpark tasks, support clicking to jump to DLC or Spark at the top of logs to view more logs and execution results.
Product portal:
Click this run > corresponding SQL result > log > DLC: navigate to the DLC console view for more running logs, detailed information, and insights.
Click this run > corresponding SQL result > log > Spark: navigate to the corresponding execution page for more running logs and details.

Log entry:
Search for Execution Summary in logs to locate the execution summary of this run. It shows the DLC UI and Spark UI of this run. Press and hold the command key on the keyboard and click the UI in logs to navigate to the corresponding page for more detailed log information.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback