Nishant Gupta
Nishant Gupta

Reputation: 41

How do we use query configurations while using SQL client in Flink SQL?

How do we use query configurations while using SQL client in Flink SQL?

The same fashion as mentioned in the link below for https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/table/streaming/query_configuration.html

Want to use Idle state retention time.

Upvotes: 0

Views: 662

Answers (1)

David Anderson
David Anderson

Reputation: 43707

Flink's SQL client can read a YAML configuration file on startup, and this file can include idle state retention specifications. For example, you might start the client via

sql-client.sh embedded -e sql-client-config.yaml

where the config file contains

execution:
  planner: old                      # optional: either 'old' (default) or 'blink'
  type: streaming                   # required: execution mode either 'batch' or 'streaming'
  result-mode: table                # required: either 'table' or 'changelog'
  max-table-result-rows: 1000000    # optional: maximum number of maintained rows in
                                    #   'table' mode (1000000 by default, smaller 1 means unlimited)
  time-characteristic: event-time   # optional: 'processing-time' or 'event-time' (default)
  parallelism: 1                    # optional: Flink's parallelism (1 by default)
  periodic-watermarks-interval: 200 # optional: interval for periodic watermarks (200 ms by default)
  min-idle-state-retention: 0       # optional: table program's minimum idle state time
  max-idle-state-retention: 0       # optional: table program's maximum idle state time

See the docs for more details.

Upvotes: 1

Related Questions