Re: QueryRecord with Union type

2022-03-18 Thread Mark Payne
Steve, What version of nifi are you running? I’d tried that on the latest “main” branch and it worked as expected. Thanks -Mark On Mar 18, 2022, at 5:49 AM, stephen.hindma...@bt.com wrote: Mark, Thank you for your response. I thought that was probably the cas

Re: QueryRecord with Union type

2022-03-18 Thread Mike Thomsen
{"name":"flag_s","type":["int","boolean"]} We have a lot of type massaging baked into the Record API. If the int version is meant to be used as a boolean equivalent (0 = false, anything else is truthy) then this is something that probably already is or should be covered by that type massaging. On

RE: QueryRecord with Union type

2022-03-18 Thread stephen.hindmarch
Mark, Thank you for your response. I thought that was probably the case, but I tried a cast and it did not work. I got this error. Query: select * from flowfile where cast(flag_s as boolean) = true Error: org.apache.calcite.sql.validate.SqlValidatorException: Cast function cannot convert value