Member since
11-16-2015
892
Posts
649
Kudos Received
245
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5447 | 02-22-2024 12:38 PM | |
1364 | 02-02-2023 07:07 AM | |
3046 | 12-07-2021 09:19 AM | |
4171 | 03-20-2020 12:34 PM | |
14034 | 01-27-2020 07:57 AM |
01-10-2019
02:22 PM
3 Kudos
The sql.args.N.type parameters are actually numeric codes indicating the type, not the string name of the type. So instead of setting sql.args.4.type to "CHAR", set it to "1" instead. The mapping of numbers to types is given here.
... View more
01-09-2019
06:55 PM
Looks like @Bryan Bende answered your question on SO.
... View more
12-17-2018
06:37 PM
1 Kudo
You can use ConvertRecord for this, your JsonRecordSetWriter would have its Output Grouping property set to "One Line Per Object". The individual objects won't be pretty printed in the output as you have above, but it will remove the array braces as well as the comma delimiter, and just output each element of the above array as a JSON object on its own line.
... View more
12-12-2018
04:03 PM
What do you mean by "window variable"? Do you mean a Process Group Variable? If so, you can change it via the UI or REST API (I believe the endpoint is /nifi-api/process-groups/<id>/variable-registry/update-requests). Note that it will stop any affected processors or controller services, then change the variable value, then restart/re-enable the affected components. If you mean a Flow File attribute, you can add/change/delete those using the UpdateAttribute processor.
... View more
12-05-2018
06:30 PM
You shouldn't need SplitAvro in there, PutDatabaseRecord was designed to handle multiple records. I'll try to reproduce the issue and will keep you posted.
... View more
11-30-2018
06:23 PM
We don't publish the javadocs for NiFi (yet), but you can get at them via javadoc.io (for example, the 1.8.0 nifi-api Javadocs are here). I've been thinking about adding a Part 4 to my cookbook, collecting examples from HCC articles and mailing list questions, to provide more coverage of the available APIs. Also check my blog, those articles are usually left-of-center usages of the API, perhaps to do things for which it wasn't necessarily intended, or to give external tools to help develop scripts (like my script tester, e.g.)
... View more
11-28-2018
06:52 PM
A couple of notes: 1) There is no close() method on the session, I think you want remove(). 2) In your try block you are creating and transferring updated_flowFile, but you don't transfer or remove flowFile. If you replace close() with remove(), it should fix the "transfer relationship not specified" issue. 3) In your except block, you might need to check for updated_flowFile != None before you remove it. If the exception occurs before the updated_flowFile is created, the remove() might fail. 4) Consider using EvaluateJsonPath to extract the "left" and "top" attributes, then ReplaceText to clear the content. Then your provenance/lineage chain will remain intact. Jython is fairly slow so you may see a performance improvement by using EvaluateJsonPath -> ReplaceText
... View more
11-28-2018
03:03 PM
Yes please share any workaround / alternate solution if you have one. Looking at the code, PostgreSQL returns OTHER (1111) for JSON and JSONB types, which we don't currently handle when creating a schema, hence the error. I have written NIFI-5845 to cover this improvement.
... View more
11-27-2018
02:55 PM
Yes you can access the same key names at different places in the JSON. Can you provide a sample input JSON and the expected output JSON?
... View more
11-16-2018
06:37 PM
If you are using HDF, you'll need HDF 3.2, as IIRC the Hive 3 processors were not available in HDF 3.1. If you upgrade to HDF 3.2 the Hive 3 processors will already be in there. In your flow above you list PutHiveStreaming into PutHive3Streaming, you should only use PutHiveStreaming against Hive 1.x, and PutHive3Streaming on Hive 3.1+.
... View more