Create an SQL application
Build data processing pipelines in Aiven for Apache Flink® by creating SQL applications using Apache Flink SQL. Set up source and sink tables, define processing logic, and manage your deployments.
Prerequisite
Before creating applications, configure the data service integration for seamless integration and data management within your Flink applications.
Create and deploy an SQL application
Create an SQL application in Aiven for Apache Flink® using the Aiven Console:
-
In the Aiven Console, select the Aiven for Apache Flink service where to create and deploy a Flink application.
-
From the left sidebar, click Applications and click Create application.
-
In the Create application dialog, enter the name of your application and select SQL as the application type.
-
Click Create application.
-
Click Create first version to create the first version of the application.
-
Click Add your first source table to add a source table.
noteAs this is your first application, no other applications are available to import source tables.
-
On the Add new source table screen:
- Use the Integrated service drop-down to select the service.
- In the Table SQL section, enter the SQL statement to create the source table.
- Optionally, click Run to test how data is being retrieved from the data source. This may vary in time based on the data volume and connection speed.
- Click Add table.
-
Click Next to proceed to adding a sink table and click Add your first sink table.
noteAs this is your first application, no other applications are available to import sink tables.
-
On the Add new sink table screen:
- Use the Integrated service drop-down to select the service.
- In the Table SQL section, enter the SQL statement to create the sink table.
- Click Add table.
-
Click Next to enter the SQL statement that transforms the data from the source stream. Optionally, click Run to see how the data is extracted from the source.
-
Click Save and deploy later to save the application. You can view and access the application you created on the application overview page.
-
To deploy the application, click Create deployment. In the Create new deployment dialog:
- Select the application version to deploy. The default version for the first deployment is Version: 1.
- Select a savepoint if you wish to deploy from a specific state. No savepoints are available for the first application deployment.
- Toggle Restart on failure to automatically restart Flink jobs upon failure. See Restart strategy in SQL and JAR applications for details.
- Specify the number of parallel instances you require for the task.
-
Click Deploy without a savepoint to begin the deployment process.
-
While deploying, the application status shows Initializing. Once deployed, the status changes to Running.
Create SQL applications using Aiven CLI
For information on creating and managing Aiven for Apache Flink application using Aiven CLI, see Manage Aiven for Apache Flink® applications document.