Member since
11-16-2015
885
Posts
645
Kudos Received
244
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
500 | 02-02-2023 07:07 AM | |
1722 | 12-07-2021 09:19 AM | |
3053 | 03-20-2020 12:34 PM | |
10370 | 01-27-2020 07:57 AM | |
3464 | 08-09-2019 05:46 PM |
03-24-2021
03:23 PM
1 Kudo
What are the column names in your table? Assuming "carId" and "carType", you can use JoltTransformJson or JoltTransformRecord with the following spec: [ { "operation": "shift", "spec": { "*": { "$": "carId", "@": "carType" } } }, { "operation": "shift", "spec": { "carId": { "*": { "@": "[&0].carId" } }, "carType": { "*": { "@": "[&0].carType" } } } } ]
... View more
02-09-2021
02:12 PM
1 Kudo
If you use GrokReader you can use the same kv filter from logstash: https://community.cloudera.com/t5/Support-Questions/Grok-Patterns-Expressions-for-capturing-comma-separated-key/td-p/311126
... View more
01-29-2021
04:54 PM
Is there anything in the logs before/after the "already marked for transfer" entry? Trying to figure out how a flow file can get transferred and then something goes wrong (where we'd try to also send it to failure)
... View more
04-17-2020
08:07 AM
You can use Expression Language in the Max-Value Columns property to set them per-flowfile, but there currently isn't any way to fetch the primary key column(s) from the database and use those as the max-value columns. You could do that in upstream processors though, then set an attribute to those columns and pass that into GenerateTableFetch.
... View more
03-20-2020
12:34 PM
1 Kudo
You can refer to the "Fields" output field explicitly instead of needing another shift: [
{
"operation": "shift",
"spec": {
"*": {
"CUST_AC_NO": "[&1].ExternalSystemIdentifier",
"BRANCH_CODE": "[&1].Fields.FLD0001",
"CUST_NO": "[&1].Fields.FLD0002",
"AC_DESC": "[&1].Fields.FLD0003"
}
}
},
{
"operation": "default",
"spec": {
"*": {
"InstitutionId": "1"
}
}
}
]
... View more
03-04-2020
12:20 PM
You can call a REST API from Nashorn/Javascript in ExecuteScript, but since Nashorn doesn't have access to a DOM per se, you'll need to use Java classes for the API call, check this link for an example: https://gist.github.com/billybong/a462152889b6616deb02
... View more
02-14-2020
05:55 AM
For small XML files, you could use ExtractText to get the entire content into an attribute, then UpdateRecord with an XMLReader, adding a property for your new field (let's say "/content") and whatever writer you wish. You will have to specify the output schema for the writer, to include all the fields parsed by the XMLReader in addition to a CLOB/BLOB/String "content" field. If you want to exclude fields from the XML then just exclude them from the output schema. Then you can use a similar Reader (AvroReader if you use an AvroRecordSetWriter, e.g.) in PutDatabaseRecord. If this doesn't work for your use case, you may need to use SplitXml and work on individual records. This will degrade the performance of PutDatabaseRecord unless you merge the records back together later (using MergeRecord for example).
... View more
02-11-2020
06:00 AM
2 Kudos
That error indicates that your CSVReader is not treating the first line as a header, and thus even if you specify an explicit schema, if you don't set Treat First Line As Header to true, the reader will think the header line is a data line, and when it tries to parse it as data (numbers, e.g.) it will fail.
... View more
01-27-2020
07:57 AM
1 Kudo
In NiFi 1.10 we updated Groovy to 2.5.0 (NIFI-5254), which itself moved the date utils out to a module which is not included with groovy-all by default. Due to an oversight, the new module(s) were not included with the Groovy components, causing your script to break. I have written up NIFI-7069 to track the inclusion of this module going forward. In the meantime the blog post I linked to above explains how to use the Java 8 (not GDK) date/time classes instead, not just as a workaround but as an improvement.
... View more
08-09-2019
05:46 PM
If I am reading your use case correctly, I think you're looking for what the ForkRecord processor does; it allows you to fork a (usually single) record into multiple records based on a Record Path (similar to JSONPath but different syntax and expressiveness), possibly keeping the "root" elements common to each outgoing record.
... View more