Create a custom data format

Updated at:

Fully managed Flink provides various data formats that are supported by different types of connectors. For example, the data formats can be JSON and Avro. A table format is a storage format that defines how to map binary data onto table columns. This topic describes how to create a custom data format in the console of fully managed Flink.

Background information

When you execute the SQL DDL statement to create a table, you can configure the Format parameter in the WITH clause to specify the data format.

Limits

  • To allow fully managed Flink to identify and use your custom data formats, you must develop custom data formats based on the standard data formats provided by the Apache Flink community. For more information about the standard data formats provided by the Apache Flink community, see Formats.
  • You can upload the JAR package of one type of data format only once.

Precautions

To avoid dependency conflicts of JAR packages of different data formats, take note of the following points:
  • Make sure that the version of the Flink image is the same as the Flink version in the Project Object Model (POM) dependencies.
  • Do not upload JAR packages at the runtime layer. This indicates that you must add <scope>provided</scope> to the dependencies.
  • Use the Shade plug-in to package third-party dependencies. For more information, see Apache Maven Shade plug-in.

Create a custom data format

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage and click Console in the Actions column.
  3. In the left-side navigation pane, click Connectors. Click the Formats tab, and then click Create Custom format.
  4. In the Provide JAR step, click Click to select and select the desired file.
  5. Click Next.
  6. In the View Format step, view and modify the property information.
    You can add a description and a default value to an existing property, and add or remove properties.
  7. Click Finish.