Skip to main content

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.

  1. Log in to Ververica Cloud.

  2. 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.

  3. In the left-side navigation pane of the Console, click SQL editor and choose the Drafts tab.

  4. Click New.

Procedure

  1. 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.

  2. Click Next.

  3. Configure the basic parameters of the draft:

ParameterDescription
NameThe name of the draft that you want to create. Note: The draft name must be unique in the current project.
LocationThe folder in which the code file of the draft is saved.
Engine versionThe engine version of Flink that is used by the draft.
  1. Click Create.

  2. Click Save.

  3. 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:

TitleDescriptionIcon
Save asSave the Draft in the selected location/folderSave As button
SaveSave changes in the DraftSave button
Create temporary tableCreate a temporary table; Inserts a code snippet of the DDL statement into the current SQL editorCraete temporary table button
MoreAccess functions such as Undo, Redo, Find, FormatMore button
ValidatePerform code validationValidate button
DebugSupports statement types including Query, Insert, and Auxiliary, such as Explain. Specify a running session cluster when startingDebug button
DeployDeploy your SQL draft, and the corresponding deployment appears at the top of the deployment list under the Deployments pageDeploy button
OperationsRedirect to the corresponding deployment page (Deployment details, Overview, Metrics, Events, Exploration). Button disabled if the SQL draft hasnโ€™t been deployed yetOperations button

Tabsโ€‹

TitleDescriptionAdditional info
DraftsThis lists all the SQL drafts you have created. Double-click on an item to load it into the SQL editor window.
CatalogsThis lists any custom catalogs you have defined.See Manage table catalogs
UDFsList the SQL draftโ€™s deployed history, and revert to a particular versionSee Manage user-defined functions
ConfigurationsConfigure Engine Version and Additional Dependencies of the SQL DraftSee Manage deployment default settings
StructureDisplay a data-flow diagram for the FlinkSQL in either DAG or tree modeSee View the SQL draft code structure
VersionsList the SQL draftโ€™s deployed history, and revert to a particular versionSee Manage published job versions

Delete a SQL draftโ€‹

To delete a SQL draft:

  1. Log in to Ververica Cloud.

  2. 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.

  3. In the left-side navigation pane of the Console, click SQL Editor and choose the Drafts tab.

  4. Select the SQL Draft you want to delete and click the Delete the selected draft (trashcan) icon.

Delete SQL draft