You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joe Gresock (Jira)" <ji...@apache.org> on 2022/01/06 20:51:00 UTC

[jira] [Updated] (NIFI-9547) LookupRecord could support more data types in replacements

     [ https://issues.apache.org/jira/browse/NIFI-9547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Gresock updated NIFI-9547:
------------------------------
    Description: 
LookupRecord can currently only replace values with numeric, boolean, or string data types.  If a timestamp field, for example, is configured as a dynamic property, LookupRecord will pass a string value to the LookupService.  In implementations like KuduLookupService, this can cause an exception such as the following, if the field is actually a timestamp column in Kudu:

{code:java}
Caused by: java.lang.IllegalArgumentException: deactivationdate's type isn't [Type: string, Type: varchar], it's unixtime_micros
        at org.apache.kudu.client.KuduPredicate.checkColumn(KuduPredicate.java:1171)
        at org.apache.kudu.client.KuduPredicate.newComparisonPredicate(KuduPredicate.java:434)
        at org.apache.kudu.client.KuduPredicate.newComparisonPredicate(KuduPredicate.java:547)
        at org.apache.nifi.controller.kudu.KuduLookupService.lambda$lookup$1(KuduLookupService.java:260)
{code}

We should add support for more data types using something like DataTypeUtils.convertType.

  was:
LookupRecord can currently only replace values with numeric, boolean, or string data types.  If a timestamp field, for example, is configured as a dynamic property, LookupRecord will pass a string value to the LookupService.  In implementations like KuduLookupService, this causes an exception such as:

{code:java}
Caused by: java.lang.IllegalArgumentException: deactivationdate's type isn't [Type: string, Type: varchar], it's unixtime_micros
        at org.apache.kudu.client.KuduPredicate.checkColumn(KuduPredicate.java:1171)
        at org.apache.kudu.client.KuduPredicate.newComparisonPredicate(KuduPredicate.java:434)
        at org.apache.kudu.client.KuduPredicate.newComparisonPredicate(KuduPredicate.java:547)
        at org.apache.nifi.controller.kudu.KuduLookupService.lambda$lookup$1(KuduLookupService.java:260)
{code}

We should add support for more data types using something like DataTypeUtils.convertType.


> LookupRecord could support more data types in replacements
> ----------------------------------------------------------
>
>                 Key: NIFI-9547
>                 URL: https://issues.apache.org/jira/browse/NIFI-9547
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Joe Gresock
>            Priority: Major
>
> LookupRecord can currently only replace values with numeric, boolean, or string data types.  If a timestamp field, for example, is configured as a dynamic property, LookupRecord will pass a string value to the LookupService.  In implementations like KuduLookupService, this can cause an exception such as the following, if the field is actually a timestamp column in Kudu:
> {code:java}
> Caused by: java.lang.IllegalArgumentException: deactivationdate's type isn't [Type: string, Type: varchar], it's unixtime_micros
>         at org.apache.kudu.client.KuduPredicate.checkColumn(KuduPredicate.java:1171)
>         at org.apache.kudu.client.KuduPredicate.newComparisonPredicate(KuduPredicate.java:434)
>         at org.apache.kudu.client.KuduPredicate.newComparisonPredicate(KuduPredicate.java:547)
>         at org.apache.nifi.controller.kudu.KuduLookupService.lambda$lookup$1(KuduLookupService.java:260)
> {code}
> We should add support for more data types using something like DataTypeUtils.convertType.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)