With the two.1 launch, Apache Flink additionally now helps Course of Desk Capabilities (PTFs), probably the most highly effective type of operate for Flink SQL and Desk API, the PMC mentioned. Conceptually, a PTF is a superset of all different user-defined capabilities, mapping zero, one, or a number of tables to zero, one, or a number of rows. This allows implementing user-defined operators that may be as feature-rich as built-in operations, the PMC mentioned. PTFs have entry to Flink’s managed state, event-time, desk change logs, and timer providers.
Apache Flink 2.1 additionally provides VARIANT
as an information sort for semi-structured knowledge akin to JSON. This new sort helps storing any semi-structured knowledge together with ARRAY
, MAP
(with STRING
keys), and scalar varieties whereas preserving area sort data in a JSON-like construction. Not like the ROW
and STRUCTURED
varieties, VARIANT
supplies superior flexibility for dealing with deeply nested and evolving schemas. Customers can use PARSE_JSON
or TRY_PARSE_JSON
to transform JSON-formatted VARCHAR
knowledge to VARIANT
.
Additionally in Apache Flink 2.1: