Re: Maximum-value Columns on QueryDatabaseTable

2018-01-22 Thread Koji Kawamura
Hi Alberto,

Thanks for reporting the issue, I was able to reproduce the behavior
you described.
Although it's for Microsoft SQL Server, there has been an existing
JIRA for the same issue, NIFI-4393.
https://issues.apache.org/jira/browse/NIFI-4393

I've created a Pull Request to fix MS SQL square brackets and MySQL
back-ticks as well as generic escape with double quotes.

I hope the fix to be merged and available soon.

Thanks,
Koji

On Fri, Jan 5, 2018 at 5:58 AM, Alberto Bengoa  wrote:
> Hello Folks,
>
> Not sure if I'm running on a bug, but I'm facing a situation when I try to
> use a "not compliance" column name as my Maximum-value Column.
>
> First, I've tried to use a column named _Time-Stamp (underscore at the
> beginning + hyphen on the middle). This column creates a state like this:
>
> "man_fabrica-cdc"@!@_time-stamp 2018-01-04 15:58:07.877 Cluster
>
> I was wondering if wouldn't QueryDatabaseTable works with Timestamp fields
> as Maximum-value Column. So, I've changed to another column to make a try
> (column name _Change-Sequence), and got this state:
>
> "man_fabrica-cdc"@!@_change-sequence 252254 Cluster
>
> Enabling Nifi debug I see that no "WHERE" clause was passed when
> Maximum-value Column is filled with quotes ("_my-strange-column-name"). On
> the other hand, if I do not wrap the odd column name with quotes I got an
> error message like this from JDBC Driver:
>
> nifi-app_2017-12-12_11.0.log:Caused by: java.sql.SQLException:
> [DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement
> at or about "_Time-Stamp FROM "man_fabrica-cdc" WHERE" (10713)
>
> I'm using "Normalize Table/Column Names" as suggested here [1].
>
> [1] -
> http://apache-nifi-users-list.2361937.n4.nabble.com/Hyphenated-Tables-and-Columns-names-td3650.html#a3655
>
> Thanks!
>
> Alberto


Dynamic XPath

2018-01-22 Thread Georg Heiler
Hi,

how can I support dynamic XPath queries in NiFi?

http://apache-nifi.1125220.n5.nabble.com/Expression-language-support-in-EvaluateXPath-td18041.html
states
that due to performance wifi expression language is not supported for
dynamic x-path queries. Has there been any progress regarding this?
https://issues.apache.org/jira/browse/NIFI-4190 also, what would you
suggest to accomplish the desired goal? Maybe some XSLT to JSON and then
dynamic filtering? Or a python script?


Best,
Georg