Matt Burgess created NIFI-5471:
----------------------------------

             Summary: QueryDatabaseTable does not correctly support arbitrary 
queries on Oracle
                 Key: NIFI-5471
                 URL: https://issues.apache.org/jira/browse/NIFI-5471
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
            Reporter: Matt Burgess


NIFI-1706 added the capability to generate the "table" it uses for incremental 
fetch from a SQL statement, rather than generating it directly from "Columns to 
Return", "Max Value Columns", etc. When a SQL query is supplied, it is wrapped 
as a nested query in a SELECT, and the result is aliased to the provided "Table 
Name" property value.

Currently this is done by simply generating a string "SELECT (" + query + ") AS 
" + tableName. However some databases (such as Oracle) do not allow the "AS" 
keywords for aliasing things like tables. The getWrappedQuery() method should 
delegate to the specified database adapter for generating a table alias clause. 
Many adapters will return "AS " + tableName, where the Oracle adapter(s) will 
simply return the table name.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to