SQL Deployment#

Overview#

Ververica Cloud allows you to run Python Deployments. This topic describes how to quickly set up a JAR Deployment, run it, and view the outputs on the Ververica Cloud environment.

Prerequisites#

  • Sign up for Ververica Cloud and set up your password after receiving the confirmation email.

Procedure#

Step 1: Create a Workspace on Ververica Cloud#

  1. On the Dashboard page, click New Workspace.

  2. On the New Workspace page, configure the Region and Workspace Name.

Parameter

Description

Example Value

Region

We support the following regions in the VVC Beta release: Europe (Frankfurt), US West (N. California), and US East (N. Virginia).

US West (N. California)

Workspace Name

  • maximum 128 characters

  • allowed characters: upper letters, lower letters, numbers, special chars: SPACE(“ “), UNDERSCORE(“_“), DASH(“-“)

yes

Resource Quota

In the Beta version, each user will have 10 CUs by default. Read-only field.

10 CUs

  1. Click Create Workspace and you will be redirected to your Dashboard.

Note

After you complete the above steps, the new workspace will be in creating status. In most cases, the workspace can be created within 5 minutes.

Step 2: Create an SQL draft and write business code#

  1. On the Dashboard page, locate your workspace, click the title of the workspace or this icon ⋮, and select Open Console.

  2. In the left-side navigation pane of the Console, click SQL Editor.

Placeholder
  1. Click New.

Placeholder
  1. In the New Draft dialog box, select the blank template and click Next.

Placeholder
  1. Fill in the parameters accordingly.

Parameter

Description

Example Value

Name

The name of the draft. Note: The draft name must be unique in the current project.

PYTHON

Location

The folder where the code file of the draft is stored. By default, the code file of the draft is stored in the Development folder. Click the icon on the right of an existing folder to create a subfolder.

Development

Engine Version

In Beta release, the default engine version is vvr-0.5.0-flink-1.15

vvr-0.5.0-flink-1.15

  1. Click Create.

Placeholder
  1. Copy the following deployment code to the code editor.

CREATE TEMPORARY TABLE datagen_source(
  randstr VARCHAR
) WITH (
  'connector' = 'datagen'
);

CREATE TEMPORARY TABLE print_table(
  randstr  VARCHAR
) WITH (
  'connector' = 'print',
  'logger' = 'true'
);

INSERT INTO print_table
SELECT SUBSTRING(randstr,0,8) from datagen_source;

Datagen source table that generates random data and enables the system to display the data of the randstr field in the datagen source table.

  1. Click Validate to check the syntax.

  2. After the syntax passes the verification, click Deploy. In the Deploy draft dialog box, click Confirm.

Step 4: Start the deployment and view the result#

  1. To the right of the target job name, click Start in the Actions column.

  2. Fill in the startup option information.

The start options for streaming jobs are as follows:

  • Initial Mode: If you have a new online job, you can start with Initial Mode. In addition, if the State cannot be reused, you can also start the job without any initial states. After you select Initial Mode, you can select Specify source table start time and provide specific time information.

Placeholder
  • Resume Mode: You can start with an existing state.

Placeholder
  1. Click Start.

After the deployment is started, the deployment status changes to RUNNING. This indicates that the deployment is running properly.

Step 5: View the results#

  1. Click the name of the desired deployment.

  2. Click the Logs tab >> Running Logs tab >> choose Running Task Managers

  3. On the Running Task Managers tab, click the value in the Path, ID column.

Placeholder
  1. Under the Log List tab, click the flink*.out file and you will see the results.

Placeholder Placeholder