Performance Tuning # SQL is the most widely used language for data analytics. Flink’s Table API and SQL enables users to define efficient stream analytics applications in less time and effort. Moreover, Flink Table API and SQL is effectively optimized, it integrates a lot of query optimizations and tuned operator implementations. But not all of the optimizations are enabled by default, so for some workloads, it is possible to improve performance by turning on some options.| nightlies.apache.org
User-defined Functions # User-defined functions (UDFs) are extension points to call frequently used logic or custom logic that cannot be expressed otherwise in queries. User-defined functions can be implemented in a JVM language (such as Java or Scala) or Python. An implementer can use arbitrary third party libraries within a UDF. This page will focus on JVM-based languages, please refer to the PyFlink documentation for details on writing general and vectorized UDFs in Python.| nightlies.apache.org
Configuration # By default, the Table & SQL API is preconfigured for producing accurate results with acceptable performance. Depending on the requirements of a table program, it might be necessary to adjust certain parameters for optimization. For example, unbounded streaming programs may need to ensure that the required state size is capped (see streaming concepts). Overview # When instantiating a TableEnvironment, EnvironmentSettings can be used to pass the desired configuration for the cur...| nightlies.apache.org
Versioned Tables # Flink SQL operates over dynamic tables that evolve, which may either be append-only or updating. Versioned tables represent a special type of updating table that remembers the past values for each key. Concept # Dynamic tables define relations over time. Often, particularly when working with metadata, a key’s old value does not become irrelevant when it changes. Flink SQL can define versioned tables over any dynamic table with a PRIMARY KEY constraint and time attribute.| nightlies.apache.org
Time Attributes # Flink can process data based on different notions of time. Processing time refers to the machine’s system time (also known as epoch time, e.g. Java’s System.currentTimeMillis()) that is executing the respective operation. Event time refers to the processing of streaming data based on timestamps that are attached to each row. The timestamps can encode when an event happened. For more information about time handling in Flink, see the introduction about event time and water...| nightlies.apache.org
Temporal Table Function # A Temporal table function provides access to the version of a temporal table at a specific point in time. In order to access the data in a temporal table, one must pass a time attribute that determines the version of the table that will be returned. Flink uses the SQL syntax of table functions to provide a way to express it. Unlike a versioned table, temporal table functions can only be defined on top of append-only streams — it does not support changelog inputs.| nightlies.apache.org
Streaming Concepts # Flink’s Table API and SQL support are unified APIs for batch and stream processing. This means that Table API and SQL queries have the same semantics regardless whether their input is bounded batch input or unbounded stream input. The following pages explain concepts, practical limitations, and stream-specific configuration parameters of Flink’s relational APIs on streaming data. State Management # Table programs that run in streaming mode leverage all capabilities of...| nightlies.apache.org
Dynamic Tables # SQL - and the Table API - offer flexible and powerful capabilities for real-time data processing. This page describes how relational concepts elegantly translate to streaming, allowing Flink to achieve the same semantics on unbounded streams. Relational Queries on Data Streams # The following table compares traditional relational algebra and stream processing for input data, execution, and output results. Relational Algebra / SQL Stream Processing Relations (or tables) are bo...| nightlies.apache.org