The Realtime Compute for Apache Flink extension for VS Code streamlines the local development process for Flink jobs. You can use the extension to develop, deploy, and publish Flink jobs from your local environment. You can also sync job configurations from your online environment. This topic describes how to use the VS Code extension.
Prerequisites
You have created a workspace.
You have obtained an AccessKey pair with the permissions for the target namespace.
You have downloaded and installed VS Code v1.74.0+ .
Limitations
Log configuration is not supported.
Pulling existing jobs is not supported.
Install and configure the extension
Download and install the extension.
Method 1: Go to the Visual Studio Marketplace and install Flink Realtime Compute Studio.
Method 2:
Open VS Code and click EXTENSIONS in the left navigation menu.
In the search bar, enter
Flink Realtime Compute Studio.Click Install.
In the menu bar, click and select a local folder.
Configure the AccessKey information.
Workspace-wide
Click
in the left menu bar. In the Configure AK&SK section, click Configure in a .vvprc file. The extension automatically creates a file with the .vvprcextension.
Enter the following configuration information.
{ "accessKey": "xxx", "secretKey": "xxx", "namespace": "xxx", "workspace": "xxx", "regionId" : "xxx" }Parameter
Description
Notes
accessKey
The AccessKey ID of your account.
secretKey
The AccessKey secret of your account.
namespace
The name of the Flink namespace.
workspace
The ID of the Flink workspace.
regionId
The region ID.
See the region ID in Endpoints.
Globally
Click
in the left menu bar.Click . You are redirected to the global settings of VS Code.

Select User or Workspace to configure the settings as needed.
NoteThe User configuration applies to all projects and workspaces in the VS Code editor and is stored in the global configuration file. The Workspace configuration applies only to the currently open workspace.
Parameter
Description
Notes
Access Key
The AccessKey ID of your account.
Secret Key
The AccessKey secret of your account.
Namespace
The name of the Flink namespace.
Workspace
The ID of the Flink workspace.
Region ID
The region ID.
See the region ID in Endpoints.
NoteConfiguration priority: Current folder > Parent folder > Global.
After the configuration is applied, the name of the corresponding namespace appears in the status bar at the bottom of the job editor.
(Optional) Install the following extensions to improve your coding efficiency.
Flink SQL: Install Flink SQL Language Features. This extension provides Flink SQL support.
Flink configuration: Install YAML. This extension provides an auto-complete feature for YAML scripts.
Procedure
Step 1: Create a job
Method 1: Click
in the left menu bar. In the QUICK START section, click Create a new deployment. Enter a name at the top and press Enterto create a.vvpfile. This creates a job with default fields.
Method 2: In the file tree, create a
.vvpfile.
Step 2: Configure the job
Configure job settings visually:

Alternatively, click Raw File in the upper-left corner to configure the job in the source file. In the UI form, click a parameter name to navigate to the corresponding location in the source file.

Basic settings:
Resources: See Configure job resources.
Parameters: See Parameters.
Step 3: Deploy the job
After you configure the job, click Create at the bottom of the page to deploy it. For an existing local job, click Update to deploy your changes.
For SQL jobs, the extension validates the SQL script, resource plan, and other job configurations, and then displays the validation results.
Step 4: Start the job
For a deployed job, the current job status is displayed in the upper-right corner. Click Start and select a startup mode. For more information, see Start a job.

Step 5: Perform job O&M

Open Online: View the detailed running status of the job or perform O&M operations in the Development Console.
Synchronize: Synchronize jobs from the console. Click Synchronize to open the job preview page (SQL draft updates not available). After confirmation, click Accept in the upper-right corner. The extension then overwrites the local job file with the job file from the cloud.
Cancel: Stop the job.