Create and delete a SQL draft
This document explains how to create and delete a SQL draft in Ververica Cloud.
Create a SQL draftโ
To enhance the efficiency of writing and managing Flink SQL jobs, Ververica Cloud provides a set of Flink SQL features. You can use these features to manage metadata, register user-defined functions (UDFs), and use the SQL editor.
Log in to Ververica Cloud.
On the Dashboard page, locate the workspace you want to manage and do one of the following:
Click the title of the workspace.
Click the menu button at the end of the workspace entry โฎ and select Open Console.
In the left-side navigation pane of the Console, click SQL editor and choose the Drafts tab.
Click New.
In the New Draft dialog box, select an SQL script template.
For a script without a code template, click Blank Stream Draft.
For scripts with a code template, click Flink Table, Temporary Table, Temporary View statement, INSERT INTO.
Click Next.
Configure the basic parameters of the draft:
Parameter | Description |
---|---|
Name | The name of the draft that you want to create. Note: The draft name must be unique in the current project. |
Location | The folder in which the code file of the draft is saved. |
Engine version | The engine version of Flink that is used by the draft. |
Click Create.
Click Save.
Click Validate.
Additional functionalityโ
The SQL Editor has the following toolbar buttons and tabs:
Toolbar buttonsโ
The following tools are available in the toolbar at the top of the SQL Editor window:
Title | Description | Icon |
---|---|---|
Save as | Save the Draft in the selected location/folder | |
Save | Save changes in the Draft | |
Create temporary table | Create a temporary table; Inserts a code snippet of the DDL statement into the current SQL editor | |
More | Access functions such as Undo, Redo, Find, Format | |
Validate | Perform code validation | |
Debug | Supports statement types including Query, Insert, and Auxiliary, such as Explain. Specify a running session cluster when starting | |
Deploy | Deploy your SQL draft, and the corresponding deployment appears at the top of the deployment list under the Deployments page | |
Operations | Redirect to the corresponding deployment page (Deployment details, Overview, Metrics, Events, Exploration). Button disabled if the SQL draft hasnโt been deployed yet |
Tabsโ
Title | Description | Additional info |
---|---|---|
Drafts | This lists all the SQL drafts you have created. Double-click on an item to load it into the SQL editor window. | |
Catalogs | This lists any custom catalogs you have defined. | See Manage table catalogs |
UDFs | List the SQL draftโs deployed history, and revert to a particular version | See Manage user-defined functions |
Configurations | Configure Engine Version and Additional Dependencies of the SQL Draft | See Manage deployment default settings |
Structure | Display a data-flow diagram for the FlinkSQL in either DAG or tree mode | See View the SQL draft code structure |
Versions | List the SQL draftโs deployed history, and revert to a particular version | See Manage published job versions |
Delete a SQL draftโ
To delete a SQL draft:
Log in to Ververica Cloud.
On the Dashboard page, locate the workspace you want to manage and do one of the following:
Click the title of the workspace.
Click the menu button at the end of the workspace entry โฎ and select Open Console.
In the left-side navigation pane of the Console, click SQL Editor and choose the Drafts tab.
Select the SQL Draft you want to delete and click the Delete the selected draft (trashcan) icon.