Member since
08-21-2018
11
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2929 | 08-23-2018 04:49 AM |
08-24-2018
04:13 AM
Unable to solve this issue. The process works with the Advance editor The JOLT [{
"operation": "shift",
"spec": {
"@.source": "header.source",
"@.author": "header.author",
"@.publishedAt": "header.date",
"@.title": "header.title",
"@.description": "header.description",
"@.urlToImage": "header.image",
"@.url": "header.url",
"@": "source"
}
},
{
"operation": "default",
"spec": {
"triples":{},
"header": {
"id":"${uuid}",
"type": "News",
"ingestMethod": "NiFi",
"injestionMethod" : "${methodName}",
"injestionUrl" : "${url}${searchQuery}${apiKey}${fromDate}${domains}",
"injestDate":"${now()}"
}
}
}
] the feed coming from a JsonSplit {
"source": {
"id": "abc-news-au",
"name": "ABC News (AU)"
},
"author": "ABC Radio National",
"title": "The Talented Mr Daly",
"description": "Peter Daly projects confidence and success. He wears gold rings, gold cufflinks, and a gold watch. The market, he says, is his backyard and he knows it \"damn well\". But the 59-year-old is actually in a world of trouble. The corporate watchdog, ASIC, accuses h…",
"url": "http://www.abc.net.au/radionational/programs/backgroundbriefing/the-talented-mr-daly/10158316",
"urlToImage": "http://www.abc.net.au/radionational/image/10158320-1x1-700x700.jpg",
"publishedAt": "2018-08-25T22:05:00Z"
}
... View more
Labels:
- Labels:
-
Apache NiFi
08-23-2018
04:49 AM
1 Kudo
I have solved the problem.
It was simple issue but all new to this and none of the examples online show this fix.
First you need to have a keystore and there is a link above on creating one of those.
Then this is what was missed you need to download the certificate from the site providing the data.
echo -n | openssl s_client -connect newsapi.org:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/examplecert.crt Then import to your keystore sudo keytool -import -keystore truststore.jks -file /tmp/examplecer.crt -alias <sitename> Then set up the Control Service Device for the StandardSSLContextService
... View more
08-22-2018
11:08 PM
I added this answer yesterday but not there today. YES and YES I can access newsapi.org via ping from the server for nifi.
... View more
08-22-2018
05:17 AM
Thank you @Steven Matison this solved the set up of the standardSSLContextService with the help of This article on setting up the cacerts but I still get a UnknownHostException. Any ideas anyone? Same thing happens on GetHTTP as well.
... View more
08-21-2018
04:55 AM
I have created a aipKey to access newsapi.org I have a simple query https://newsapi.org/v2/everything?q=bitcoin&apiKey=<key>; I get one of two error using a GetHTTP processor (SSL) Or if I use http:// I get unknownhostexception. If I use an InvokeHttp processor I just get unknown host. I can curl the request from the server so it is not blocked. When i set up a standardSSLContextService I am unsure where the certificate path is and what other information is meant to b in this. It all seems a bit of a bother to simply consume a JSON api feed.
... View more