Member since
06-02-2020
40
Posts
4
Kudos Received
8
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
4012 | 09-30-2020 09:27 AM | |
2481 | 09-29-2020 11:53 AM | |
3938 | 09-21-2020 11:34 AM | |
4217 | 09-19-2020 09:31 AM | |
2526 | 06-28-2020 08:34 AM |
09-30-2020
01:27 AM
Hi @praneet , Can you add Authorization inside "Attributes to Send" property and tell me if you are still getting the error?
... View more
09-30-2020
01:19 AM
Hi @Manoj90 , Please terminate original relation from GetHTMLElement. The reason you are getting so many flowFiles is as follows: On the first run, GetHTMLElement processor is returning 10 flowFiles to the "success" relation. As the operation was successful, the input flowFile(10.79 KB) will be routed to original relation as well. Then, you have the same file which was input for GetHTMLElement processor. Again, it starts processing and sends 10 flowFiles to success relation and the original(input) flowFile to original relation. This loop will continue infinitely till you get memory issue.
... View more
09-30-2020
12:44 AM
Hi @kquintero, Can you put the attribute into flowFile content and see if the spaces are removed in the content as well? From what I know, attributes won't show extra spaces, but, the spaces are still present. Even when you hover over those values, you can still see the empty spaces.
... View more
09-29-2020
02:10 PM
Hi @vineet_harkut , To check if the required parameters are valid in MongoDB processor, what I would do is Suppose, there is a query like {"key":"someValue","name":"someOtherValue"}. And "someValue" and "someOtherValue" are values inside the attributes of the incoming flowFile with attribute-names "key" and "name" respectively. Hence, the resulting query in the GetMongo processor will be {"key":"${key}","name":"${name}"}. Before using the GetMongo processor, I would use RouteOnAttribute processor to check if the input to the query is a valid one. If the input is correct, I will make a query to the GetMongo processor. If the document for the query is not found, the GetMongo processor will return empty document (empty string) as content in the flowfile only when Send Empty Result is set to true inside the GetMongo processor. Later, when I use EvaluateJsonPath processor, the flowfile will be routed to "failure" when the flowfile is empty, as empty string is not a valid JSON or to "matched" if the match for the given jsonPath is found. This will put the same content inside the flowfile as $ corresponds to entire JSON object that we are getting from the input flowfIle. Now, you can add the remaining logic.
... View more
09-29-2020
12:06 PM
Hi @Sru111 , Consider the MergeContent processor in the picture as your MergeContent processor. Configure the queue(here, 'success') that acts as the upstream queue for your MergeContent processor. Select the load balance strategy as Single node, then you will get all the files as input to only one of the nodes. (Optional) You can configure the donwstream queue of MergeContent processor to have the load balance strategy as Round Robin, so that the files are distributed among all the nodes in the cluster.
... View more
09-29-2020
11:53 AM
Hi @Sru111 , For FetchSFTP processor, change the Bulletin level to NONE. Then, that error won't appear. If there are any other errors like authentication error or communication timeout, bulletin won't appear for them as well. But, the flowFiles will still be routed to the respective relations.
... View more
09-27-2020
08:08 AM
Hi @wcbdata Can you explain the usage of '#' in the spec you used above: {
"operation": "shift",
"spec": {
"tmp": {
"*": {
"0": {
"*,*,*,*": {
"@(4,runid)": "particles.[#4].runid",
"@(4,ts)": "particles.[#4].ts",
"$(0,1)": "particles.[#4].Xloc",
"$(0,2)": "particles.[#4].Yloc",
"$(0,3)": "particles.[#4].Xdim",
"$(0,4)": "particles.[#4].Ydim"
}
}
}
},
"*": "&"
}
}
... View more
09-21-2020
11:34 AM
Hi @DarkStar Your Expression Language(EL) should be ${field.value:substring(0,28):toDate("MMM dd,yyyy HH:mm:ss.SSSSSSSSS"):format("yyyy-MM-dd HH:mm:ss.SSSSSS")} In your EL, the pattern you used has 6 "S". But, the input has precision upto 9. Since, you gave 6, it is reading the last 6 characters, i.e., 388267000. I think, that must be the reason.
... View more
09-21-2020
08:51 AM
Hi @praneet ! Look at the spec I used Input used: { "Подписка":"awdl" } Spec: [ { "operation": "shift", "spec": { "Подписка":"Подпиа" } } ] Output got: {"Подпиа":"awdl"} I was able to perform jolt without any problems in nifi-1.11.4 Tell me if you are still facing the issues.
... View more
09-21-2020
08:21 AM
1 Kudo
Hi @Kilynn ! Firstly, I tried to use regex to replace "} {" (variable space) with "},{". Then, I tried adding square brackets at the beginning and the end ( "[" and "]" ). Then, I got a valid Json. ReplaceText config: Groovy code: import org.apache.commons.io.IOUtils import java.nio.charset.StandardCharsets flowFile = session.get() if (!flowFile) return try { def input = ''; session.read(flowFile, {inputStream -> input = IOUtils.toString(inputStream, StandardCharsets.UTF_8) } as InputStreamCallback); flowFile = session.putAttribute(flowFile,'Content-Type','application/json'); flowFile = session.putAttribute(flowFile,'mime.type','application/json'); flowFile = session.write(flowFile, { outputStream -> outputStream.write(('['+input+']').toString().getBytes(StandardCharsets.UTF_8)) }as OutputStreamCallback); session.transfer(flowFile, REL_SUCCESS); } catch (e) { log.error('Error Occured,{}', e) session.transfer(flowFile, REL_FAILURE); }
... View more