Member since
11-16-2015
905
Posts
665
Kudos Received
249
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 435 | 09-30-2025 05:23 AM | |
| 768 | 06-26-2025 01:21 PM | |
| 665 | 06-19-2025 02:48 PM | |
| 857 | 05-30-2025 01:53 PM | |
| 11400 | 02-22-2024 12:38 PM |
12-08-2016
04:11 PM
1 Kudo
Your original URL "jdbc://hive2://localhost:10000/default" has slashes between jdbc: and hive2, this should instead be jdbc:hive2://localhost:10000/default For the zookeeper version of the URL, that is a known issue (NIFI-2575), I would recommend correcting the original URL and using that (port 10000 should be opened/forwarded on the sandbox already).
... View more
12-07-2016
09:56 PM
There is a table for JDBC type values here, for your data types they are as follows: Type Value INTEGER 4 TIMESTAMP 93 DOUBLE 8 LONGVARCHAR -1
... View more
12-06-2016
09:31 PM
Each processor is responsible for reading and writing whichever attributes it wants to for the purposes of its processing, and those attributes are available in each processor's documentation. SplitJson for example writes the following attributes to each output flow file: Name Description fragment.identifier All split FlowFiles produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute fragment.index A one-up number that indicates the ordering of the split FlowFiles that were created from a single parent FlowFile fragment.count The number of split FlowFiles generated from the parent FlowFile segment.original.filename The filename of the parent FlowFile These were added to NiFi 1.0.0 (HDF 2.0) under NIFI-2632, so if you are using a version of NiFi/HDF before that, that's why you won't see these attributes populated by SplitJson.
... View more
12-05-2016
02:26 PM
@Arsalan Siddiqi PutElasticsearch and FetchElasticsearch support Elasticsearch 2.X clusters, it looks like you are trying to use ES 5.x. NiFi 1.1.0 and HDF 2.1.0 will have Elasticsearch 5 processors (PutElasticsearch5 and FetchElasticsearch5). In the meantime the Http processors should connect to both ES 2.X and 5.X clusters
... View more
12-05-2016
02:23 PM
1 Kudo
Both PutElasticsearch and FetchElasticsearch use the transport client. There are Http versions of both (PutElasticsearchHttp and FetchElasticsearchHttp) that use the REST API.
... View more
12-02-2016
06:57 PM
What error(s) are you seeing? If it mentions Avro, then if your column names are in Chinese, it's likely that Avro does not accept them. This may be alleviated in NiFi 1.1.0 with NIFI-2262, but it would just replace non-Avro-compatible characters with underscores, so you may face a "duplicate field" exception. In that case you would need column aliases in your SELECT statement to use Avro-compatible names for the columns.
... View more
11-30-2016
12:56 PM
2 Kudos
Depending on how fast the flow files are coming through, using the timestamp might result in the same filename as well. You could use ${uuid}, which is the UUID of the flow file (guaranteed to be unique), or ${nextInt()}, which is an auto-incrementing value
... View more
11-28-2016
01:54 PM
2 Kudos
To follow up on your first question above, Groovy has many features and supports multiple paradigms such as OO (like Java), functional programming, etc. Also it can be used as a scripting language, which is why you don't often see explicitly-defined classes and methods in the example scripts (both in @Artem Ervits answer and the examples on my blog). For ExecuteScript, the Script Body is treated like a script, so it can be evaluated without needing to define a top-level class. Under the hood, Groovy wraps the script in a Script object (such that it obeys the JVM rules). For your second question, you can add additional logic inside the inputStream.eachLine closure to do any transformations. So instead of just writing out a[1] a[2] after you've tokenized the input stream, you can do additional things such as: if(a[2].startsWith('3300')) a[2] = a[2].replaceFirst('33','22')
if(a[2].startsWith('0')) a[2] = a[2].replaceFirst('0','00212') Then you can output the space-separated columns.
... View more
11-22-2016
06:18 PM
Yes, PutSQL accepts any SQL statement (except Callable statements like stored procedures) that does not return a result set, so DDL/DML commands such as LOAD INTO or CREATE TABLE, etc. are supported.
... View more
11-21-2016
07:15 PM
2 Kudos
This is a bug, I have filed it under NIFI-3076. Workarounds might include changing the domain_id column to be signed (which is probably not desired), or using a cast() function to convert it into a data type (long, e.g.) that will be handled better for the time being. If you use a cast() or other function, you may want a column alias to ensure the column/field name is the one you want.
... View more