[
https://issues.apache.org/jira/browse/NIFI-15981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Turcsanyi updated NIFI-15981:
-----------------------------------
Fix Version/s: 2.10.0
Resolution: Fixed
Status: Resolved (was: Patch Available)
> ClickHouse - LookupRecord fails when trying to return Array(String)
> -------------------------------------------------------------------
>
> Key: NIFI-15981
> URL: https://issues.apache.org/jira/browse/NIFI-15981
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Jordan Sammut
> Assignee: Pierre Villard
> Priority: Critical
> Fix For: 2.10.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> I have the following view in ClickHouse (Cloud):
> {code:java}
> CREATE OR REPLACE VIEW marts.dim_client
> AS SELECT
> client_name,
> max(updated_at) AS updated_at,
> argMaxIfMerge(is_enabled) AS is_enabled,
> nullIf(argMaxIfMerge(license), '<Empty>') AS license,
> nullIf(argMaxIfMerge(client_group), '<Empty>') AS client_group,
> nullIf(argMaxIfMerge(platform), '<Empty>') AS platform,
> nullIf(argMaxIfMerge(reporting_currency), '<Empty>') AS
> reporting_currency,
> ['Test'] AS enabled_products
> FROM marts._dim_client
> GROUP BY client_name; {code}
> When setting up a lookup service to make use of this and include the
> enabled_products, the LookupRecord returns this error:
> {code:java}
> LookupRecord[id=33edff77-c78b-367d-aafe-ebc375757016] Could not determine
> schema to use for enriched FlowFiles: java.lang.NullPointerException: Cannot
> invoke "org.apache.nifi.serialization.record.RecordSchema.getField(String)"
> because "readerSchema" is null {code}
> The reader utilized is set to infer the schema, and it should be able to from
> the result returned. When removing the field from the returned fields, the
> Lookup works well
--
This message was sent by Atlassian Jira
(v8.20.10#820010)