tencent cloud

Stream Compute Service

Releases Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Billing Mode
Refund
Configuration Adjustments
Getting Started
Preparations
Creating a Private Cluster
Creating a SQL Job
Creating a JAR Job
Creating an ETL Job
Creating a Python Job
Operation Guide
Managing Jobs
Developing Jobs
Monitoring Jobs
Job Logs
Events and Diagnosis
Managing Metadata
Managing Checkpoints
Tuning Jobs
Managing Dependencies
Managing Clusters
Managing Permissions
SQL Developer Guide
Overview
Glossary and Data Types
DDL Statements
DML Statements
Merging MySQL CDC Sources
Connectors
SET Statement
Operators and Built-in Functions
Identifiers and Reserved Words
Python Developer Guide
ETL Developer Guide
Overview
Glossary
Connectors
FAQ
Contact Us

Variables

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2023-11-07 16:25:49
Variables can be used in Variables of a SQL job. Replace table variables allows replacing variables in both temporary tables and metadata tables of a SQL job with actual values. Variable syntax: ${variable name}:default value
Note
_ is used as the separator in a variable name.

Creating a variable

Log in to the Stream Compute Service console, create a SQL job in Jobs as instructed in Creating a SQL Job, go to the Development & Testing tab of the job, and click Variables on the left.
On the Variables page, click Create > Create variable in the top right corner, enter the required information in the pop-up window, and click Confirm.

Referencing global variables in a table

On the Database/Table references page, click Create > Create table in the top right corner, select a catalog and database in the pop-up window, click Next, and select a method (three options: Template, Custom, and Cloud resource) to create the table. If you select Custom or Cloud resource, enter the required connection information. Set table variables in the WITH parameters and click Complete. For table variable naming rules, see Managing Tables.

Referencing global variables in a SQL ‍job

You can directly reference global variables in a SQL job as follows: Click Replace table variables, select Referenced global variable, and click Submit.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백