Search code examples
apache-nifi

Difference Between ExecuteSQL and ExecuteSQLRecord


I am trying to understand the difference between the two processors ExecuteSQL and ExecuteSQLRecord (V1.8 onwards). Is there something extra which the later provides and ExecuteSQL doesn't? One thing I have already seen is that ExecuteSQL doesn't mantain "state". Does ExecuteSQLRecord take care of it?


Solution

  • The two processors share a LOT of code, the only real difference is that ExecuteSQL only outputs the results as Avro, whereas ExecuteSQLRecord can output the results using any RecordSetWriter into its associated format, such as Avro, JSON, CSV, XML, etc.