[
https://issues.apache.org/jira/browse/NIFI-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979606#comment-16979606
]
Matt Burgess commented on NIFI-1201:
------------------------------------
Does QueryDatabaseTable and/or GenerateTableFetch suffice for this use case?
You could set the Max Value Column to `created_at` and on the next execution it
will only grab the rows for which created_at is "larger"/more recent than the
last time the processor executed.
> Allow ExecuteSQL to run queries with that use a variable timestamp or
> sequence id
> ---------------------------------------------------------------------------------
>
> Key: NIFI-1201
> URL: https://issues.apache.org/jira/browse/NIFI-1201
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Randy Gelhausen
> Priority: Minor
>
> Users are employing ExecuteSQL as a means to schedule periodic queries
> against remote databases. Other tools that do this type of task include the
> ability to maintain and automatically increment a sequence or timestamp used
> in query predicates.
> For example:
> select * from src_table where created_at > "2015-11-19 12:00:00"
> Then a minute later:
> select * from src_table where created_at > "2015-11-19 12:01:00"
> Or:
> insert into my_table values (${prev_id}+1, ${now()})
> Today users can implement the same logic with a series of processors, but
> much work could be saved by allowing ExecuteSQL to maintain these bits of
> state.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)