Flowagent SQL Consumer Graph

This graph demonstrates how to use Flowagent to perform a SQL query from a source and load it into a file.

This graph also shows how to read from the SQL query in parallel through the logical partitioning concept. To know more about logical partitioning specification, see the Partitioning documentation.

SQL Consumer

The SQL Consumer operator takes in a native SQL statement which will be pushdown to a MySQL database, and the response will be fetched in batches of N rows (defined by fetch size) and loaded to the next operator in line.

Prerequisite

See MySQL driver configuration in the connection documentation present in the Connection Management.

Components

  • Reader definition

    sqlconsumer1: Operator which performs the SQL query in a database.
  • Loader definition

    structuredfileproducer1: Operator that reads and writes the data into a file. Only cloud storages are supported.

  • Wait to terminate graph

    messageoperator1: Operator that waits for all partitions to finish before sending a message to graph terminator.