Member since
06-08-2017
14
Posts
0
Kudos Received
0
Solutions
11-29-2017
11:31 AM
Hi I tried to remove duplicates I have a json like below { "message":"XXXX", "id":"1" } I want to remove all json with the same id I try using detect duplicates processor I try Cashe Entry Identifier ${id} but it's not worked as expected
... View more
Labels:
- Labels:
-
Apache NiFi
10-12-2017
02:23 PM
Hi I made scenario like above but invoke http get return json and target.url how to let invoke http return json only
... View more
06-21-2017
09:38 AM
Thanks Matt, I got above error when json contain Arabic words in text.
... View more
06-20-2017
10:27 AM
I have python script, I want to parse json -contains Arabic words -but it doesn't support utf-8 encoding. I got below error. My script import json import java.io from org.apache.commons.io import IOUtils from java.nio.charset import StandardCharsets from org.apache.nifi.processor.io import StreamCallback class ModJSON(StreamCallback): def __init__(self): pass def process(self, inputStream, outputStream):
text = IOUtils.toString(inputStream, StandardCharsets.UTF_8) obj = json.loads(text)
insertquery = "insert into Tweets_test values ('"+str(obj['id'])+"','"+obj['text'].encode('utf-8')+"','"+str(obj['id_str'])+"');" outputStream.write(bytearray(insertquery)) flowFile = session.get() if (flowFile != None): flowFile = session.write(flowFile, ModJSON()) session.transfer(flowFile, REL_SUCCESS) session.commit()
... View more
Labels:
- Labels:
-
Apache NiFi