Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Howto content Flink Custom JARs application #2361

Merged
merged 7 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,13 @@ entries:
title: Integrate with Apache Kafka
- file: docs/products/flink/howto/connect-bigquery
title: Integrate with Google BigQuery
- file: docs/products/flink/howto/list-flink-applications
title: Aiven for Apache Flink applications
- file: docs/products/flink/howto/create-flink-applications
title: Apache Flink applications
entries:
- file: docs/products/flink/howto/create-flink-applications
title: Create Apache Flink applications
- file: docs/products/flink/howto/create-sql-application
title: Create an SQL application
- file: docs/products/flink/howto/create-jar-application
title: Create a JAR application
- file: docs/products/flink/howto/manage-flink-applications
title: Manage Apache Flink applications
- file: docs/products/flink/howto/list-flink-tables
Expand Down Expand Up @@ -912,10 +914,6 @@ entries:
title: Migrate external Redis






# -------- GRAFANA --------

- file: docs/products/grafana
Expand Down
71 changes: 13 additions & 58 deletions docs/products/flink/howto/create-flink-applications.rst
Original file line number Diff line number Diff line change
@@ -1,61 +1,16 @@
Create an Aiven for Apache Flink® application
==============================================

:doc:`Aiven for Flink applications </docs/products/flink/concepts/flink-applications>` in Aiven for Apache Flink® servers as a container that includes everything connected to a Flink job, including source and sink connections and data processing logic. The `Aiven Console <https://console.aiven.io/>`_ provides a guided wizard to help you build and deploy applications, simplifying the process of selecting the source and sink tables, writing data transformation statements, and validating and ingesting data through the interactive query feature.

This article provides the information required to build and deploy applications on Aiven for Apache Flink service.

.. note::
You must set up the :doc:`data service integration </docs/products/flink/howto/create-integration>` before building applications.


Create an application via the Aiven console
--------------------------------------------

Follow these steps to build your first Aiven for Flink application:

1. In the `Aiven Console <https://console.aiven.io/>`_, open the Aiven for Apache Flink service for which you want to create an application.
2. Select **Applications** from the left sidebar and select **Create application** to create your first application.
3. In the **Create new application** screen, enter the name of your application and configure the necessary deployment settings. select **Create application**.
4. Select **Create first version** to create the first version of the application.
5. Select **Add your first source table** to add a source table.

.. note::
Since this is your first application, there are currently no other applications where you can import source tables.

6. In the **Add new source table** screen,

* Select the **Integrated service** from the drop-down list.
* In the **Table SQL** section, enter the statement that will be used to create the table.
* Optionally, select **Run** to view how data is being pulled from the data source. This could take some time based on the data and the connection.
* Select **Add table**.
7. Select **Next** to add the sink table, and then select **Add your first sink table**.

.. note::
Since this is your first application, there are currently no other applications where you can import sink tables.

8. In the **Add new sink table** screen,

* Select **Integrated service** from the drop-down list.
* In the **Table SQL** section, enter the statement that will be used to create the table.
* Select **Add table**.
9. Select **Next** to enter the **SQL statement** that transforms the data from the source stream. Optionally, select **Run** to view how data is being pulled from the data source.
10. Select **Save and deploy later** to save the application. You will see the application on the landing page that provides you with an overview of your application.

.. image:: /images/products/flink/application_landingpage_view.png
:scale: 50 %
:alt: Application landing page with an view of source table, SQL statement and sink table

11. Select **Create deployment**. On the **Create new deployment** screen,

* Choose the version you wish to deploy. The default version for the first deployment is **Version: 1**.
* Choose the :doc:`savepoint </docs/products/flink/concepts/savepoints>` from where you want to deploy. No savepoints are available for the first application deployment.
* Use the toggle for **Restart on failure** to enable or disable the option of automatically restarting a Flink job in case it fails.
* Enter the number of `parallel instances <https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/execution/parallel/>`_ you want to have for the task.
12. Select **Deploy without a savepoint** to deploy your application.
13. The deployment status will show **Initializing: version 1** and then **Running: version 1**.

Your first application is now created and deployed, and you can view the data related to the actions the application needs to perform in your sink source.
Create and manage Aiven for Apache Flink® applications
===========================================================

:doc:`Aiven for Flink applications </docs/products/flink/concepts/flink-applications>` in Aiven for Apache Flink® servers as a container that includes everything connected to a Flink job, including source and sink connections and data processing logic.

Check failure on line 4 in docs/products/flink/howto/create-flink-applications.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-flink-applications.rst#L4

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-flink-applications.rst", "range": {"start": {"line": 4, "column": 52}}}, "severity": "ERROR"}

Check failure on line 4 in docs/products/flink/howto/create-flink-applications.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-flink-applications.rst#L4

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-flink-applications.rst", "range": {"start": {"line": 4, "column": 67}}}, "severity": "ERROR"}

Using the `Aiven Console <https://console.aiven.io/>`_, you can create applications that run SQL queries or deploy custom JARs, catering to diverse data processing requirements. The console's guided wizard simplifies the application configuration process, from selecting source and sink tables for SQL applications to uploading and managing JAR files for custom job execution.

.. important::

Custom JARs for Aiven for Apache Flink is a :doc:`limited availability feature </docs/platform/concepts/beta_services>`. If you're interested in trying out this feature, contact the sales team at [email protected].

MichaelTansiniAiven marked this conversation as resolved.
Show resolved Hide resolved
.. tableofcontents::




49 changes: 49 additions & 0 deletions docs/products/flink/howto/create-jar-application.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Create a JAR application

Check failure on line 1 in docs/products/flink/howto/create-jar-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-jar-application.rst#L1

[Aiven.capitalization_headings] 'Create a JAR application' should be in sentence case
Raw output
{"message": "[Aiven.capitalization_headings] 'Create a JAR application' should be in sentence case", "location": {"path": "docs/products/flink/howto/create-jar-application.rst", "range": {"start": {"line": 1, "column": 1}}}, "severity": "ERROR"}
========================
Aiven for Apache Flink® enables you to upload and deploy custom code as a JAR file, enhancing your Flink applications with advanced data processing capabilities.

.. important::

Custom JARs for Aiven for Apache Flink is a :doc:`limited availability feature </docs/platform/concepts/beta_services>`. If you're interested in trying out this feature, contact the sales team at [email protected].

Prerequisite
------------

* To enable custom JARs for a new Aiven for Apache Flink service, toggle the feature during service creation.
* For an existing service, in `Aiven Console <https://console.aiven.io/>`_ , select your project and then choose your Aiven for Apache Flink® service.

* Click **Service settings** on the left sidebar.
* Scroll to the **Advanced configuration** section, and click **Configure**.
* In the **Advanced configuration** screen, click **Add configuration options**, and using the search box find and set ``custom_code`` configuration to **Enabled** position.

Create and deploy application
---------------------------------

1. Access the `Aiven Console <https://console.aiven.io/>`_ and select the Aiven for Apache Flink service where you want to deploy a JAR application.
2. From the left sidebar, click **Applications** and then click **Create application**.
3. In the **Create application** dialog, enter a name for your JAR application, and select **JAR** as the application type from the drop-down.
4. Click **Create application** to proceed.
5. Click **Upload first version** to upload the first version of the application.
6. In the **Upload new version** dialog:

* Click **Choose file** to select your custom JAR file.
* Select the **Terms of Service** checkbox to indicate your agreement.
* Click **Upload version** to upload your JAR file.

7. After the upload, you are redirected to the application's overview page.
8. To deploy the application, click **Create deployment**. In the **Create new deployment** dialog:

* Select the application version to deploy.
* Select a :doc:`savepoint </docs/products/flink/concepts/savepoints>` if you wish to deploy from a specific state. No savepoints are available for the first application deployment.

Check failure on line 37 in docs/products/flink/howto/create-jar-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-jar-application.rst#L37

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-jar-application.rst", "range": {"start": {"line": 37, "column": 47}}}, "severity": "ERROR"}
* Toggle **Restart on failure** to automatically restart Flink jobs upon failure.
* In the **Program args** field, provide command-line arguments consisting of variables and configurations relevant to your application's logic upon submission. Each argument is limited to 64 characters, with a total limit of 32 separate items.

Check failure on line 39 in docs/products/flink/howto/create-jar-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-jar-application.rst#L39

[Aiven.aiven_spelling] 'args' does not seem to be a recognised word
Raw output
{"message": "[Aiven.aiven_spelling] 'args' does not seem to be a recognised word", "location": {"path": "docs/products/flink/howto/create-jar-application.rst", "range": {"start": {"line": 39, "column": 23}}}, "severity": "ERROR"}
* Specify the number of `parallel instances <https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/execution/parallel/>`_ you require for the task.

9. Click **Deploy without a savepoint** to begin the deployment process.
10. While deploying, the application status shows **Initializing**. Once deployed, the status changes to **Running**.


Related pages
--------------

* :doc:`Manage Aiven for Apache Flink® applications </docs/products/flink/howto/manage-flink-applications>`

Check failure on line 49 in docs/products/flink/howto/create-jar-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-jar-application.rst#L49

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-jar-application.rst", "range": {"start": {"line": 49, "column": 69}}}, "severity": "ERROR"}

Check failure on line 49 in docs/products/flink/howto/create-jar-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-jar-application.rst#L49

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-jar-application.rst", "range": {"start": {"line": 49, "column": 88}}}, "severity": "ERROR"}
61 changes: 61 additions & 0 deletions docs/products/flink/howto/create-sql-application.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Create an SQL application

Check failure on line 1 in docs/products/flink/howto/create-sql-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-sql-application.rst#L1

[Aiven.capitalization_headings] 'Create an SQL application' should be in sentence case
Raw output
{"message": "[Aiven.capitalization_headings] 'Create an SQL application' should be in sentence case", "location": {"path": "docs/products/flink/howto/create-sql-application.rst", "range": {"start": {"line": 1, "column": 1}}}, "severity": "ERROR"}
============================

In Aiven for Apache Flink®, you can create an SQL application that uses Apache Flink SQL to streamline the process of building data processing pipelines. The SQL application simplifies the process of defining source and sink tables, implementing data processing logic, and managing application deployment.

Prerequisite
------------
Before creating applications, configure the :doc:`data service integration </docs/products/flink/howto/create-integration>` for seamless integration and data management within your Flink applications.

Check failure on line 8 in docs/products/flink/howto/create-sql-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-sql-application.rst#L8

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-sql-application.rst", "range": {"start": {"line": 8, "column": 92}}}, "severity": "ERROR"}

Create and deploy application
-------------------------------

Create an SQL application in Aiven for Apache Flink® using the `Aiven Console <https://console.aiven.io/>`_:

1. In the `Aiven Console <https://console.aiven.io/>`_, select the Aiven for Apache Flink service where you want to create and deploy a Flink application.
2. From the left sidebar, click **Applications** and then click **Create application**.
3. In the **Create application** dialog, enter the name of your application and select **SQL** as the application type.
4. Click **Create application**.
5. Click **Create first version** to create the first version of the application.
6. Click **Add your first source table** to add a source table.

.. note::
As this is your first application, no other applications are available to import source tables.
Comment on lines +22 to +23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the spirit of value and word economy, do we need this note? Are we anticipating user questions for this? (same question for the next note too)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would yes for now. It addresses a potential point of confusion for new users who might see the import table option in their first application despite having no other applications to import from. In an ideal scenario, the import option would be disabled or not visible for a user's first application to prevent this confusion.

While we haven't received reports of any issues, we want to preemptively clarify any potential questions or confusion by including this note.


7. 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**.
8. Click **Next** to proceed to adding a sink table and click **Add your first sink table**.

.. note::
As this is your first application, no other applications are available to import sink tables.

9. 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**.
10. 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.

11. Click **Save and deploy later** to save the application. You can view and access the application you created on the application overview page.

.. image:: /images/products/flink/application_landingpage_view.png
:scale: 50 %
:alt: Application landing page with a view of the source table, SQL statement, and sink table

12. 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 :doc:`savepoint </docs/products/flink/concepts/savepoints>` if you wish to deploy from a specific state. No savepoints are available for the first application deployment.

Check failure on line 52 in docs/products/flink/howto/create-sql-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-sql-application.rst#L52

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-sql-application.rst", "range": {"start": {"line": 52, "column": 48}}}, "severity": "ERROR"}
* Toggle **Restart on failure** to automatically restart Flink jobs upon failure.
* Specify the number of `parallel instances <https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/execution/parallel/>` you require for the task.

Check failure on line 54 in docs/products/flink/howto/create-sql-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-sql-application.rst#L54

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-sql-application.rst", "range": {"start": {"line": 54, "column": 79}}}, "severity": "ERROR"}

Check failure on line 54 in docs/products/flink/howto/create-sql-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-sql-application.rst#L54

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-sql-application.rst", "range": {"start": {"line": 54, "column": 85}}}, "severity": "ERROR"}
13. Click **Deploy without a savepoint** to begin the deployment process.
14. 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 :doc:`Aiven CLI </docs/tools/cli>`, see :doc:`Manage Aiven for Apache Flink® applications </docs/tools/cli/service/flink>` document.

Check failure on line 60 in docs/products/flink/howto/create-sql-application.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/products/flink/howto/create-sql-application.rst#L60

[Aiven.common_replacements] Use 'Flink' instead of 'flink'.
Raw output
{"message": "[Aiven.common_replacements] Use 'Flink' instead of 'flink'.", "location": {"path": "docs/products/flink/howto/create-sql-application.rst", "range": {"start": {"line": 60, "column": 198}}}, "severity": "ERROR"}

6 changes: 0 additions & 6 deletions docs/products/flink/howto/list-flink-applications.rst

This file was deleted.

Loading
Loading