Hive UDF for SOAP XPath? - soap

In the Hive language there are XPath functions but they do not support XML namespaces.
I am in need of a UDF for SOAP message XPath processing with Hive.
Can anyone help?

I would suggest building custom UDF which will support parsing of SOAP messages.
There is good guide here how to build UDFs http://snowplowanalytics.com/blog/2013/02/08/writing-hive-udfs-and-serdes/
You can use any parses to parse SOAP message and integrate it into UDF.
Thanks,
Dino

Related

Problems creating a soap connection with IBM SDI

I have recently been working with IBM SDI software for identity and governance.
To get started I was given the exercise of building a calculator using a soap request to this WSDL server.
Given a CSV file, with ID, number1, number2 and operation attributes, i need to create a csv output file with the id attribute and the result of the operation.
Some advices were:
use "invoke soap" connector to make a request to the service
take FormEntry connector to take operations calculated by the SOAP, setting a parameter of this connector called "EntryRawData"
Up to now, the only thing I was able to do was to crate a file connector that reads the csv file in input.
The problems start with SOAP connector. Any help is kindly appreciated.
Even more I have some problems understanding what a WSDL server is, what it does, and what a SOAP request is. Thank you in advance.

Conditional routing in Apache NiFi

I'm using NiFi to get data from an Oracle database and put some of this data in Kafka (using the processor PutKafka).
Example : if the attribute "id" contains "aaabb"
Is that possible in Apache NiFi? How can i do it?
This should definitely be possible, the flow might be something like this...
1) ExecuteSQL or QueryDatabaseTable to get the data from the database, these produce Avro
2) ConvertAvroToJson processor to convert the Avro to Json
3) EvaluateJsonPath to extract the id field into an attribute
4) RouteOnAttribute to route flow files where the id attribute contains "aaabbb"
5) PutKafka to deliver any of the matching results from RouteOnAttribute
To add on to Bryan's example flow, I wanted to point you to some great documentation that should help introduce you to Apache NiFi.
Firstly, I would suggest checking out the NiFi documentation. It is very good and should help a lot. In addition to providing details on each of the processors Bryan mentioned it also has general documentation for every type of user.
For a basic introduction to build a NiFi flow check out this video.
For example templates check out this repo. It's a has an excel file at it's root level which has a description and list of processors for each template.

Load multiple records into marklogic server

How can I upload multiple records in a file into marklogic server using RESTapi.
I tried to insert simple json format file
[{"Id":100000,"Name":"Dennis"},
{"Id":100001,"Name":"Andrea"},
{"Id":100002,"Name":"Robert"},
{"Id":100003,"Name":"Sara"}]
But, it gives me like one single record.
How do I convert this into 4 different records?
Thanks in advance,
Y.Prithvi
There isn't an out-of-the-box way to do that split at the moment. Your best bet is to do a client-side split and then do a bulk-write POST with multiple JSON items to /v1/documents
For the client-side split, you might use something like underscore_cli to do the splitting.
As Dave points out, the easiest approach is to split out the documents on the client and send a multipart/mixed payload.
The alternative is to write a resource service extension to do the split. In MarkLogic 7, the service must be implemented in XQuery. In MarkLogic 8, you will also be able to implement a service in JavaScript.
The Java API bundles an example that illustrates the basic idea of a service that splits documents:
scripts/docsplit.xqy
com.marklogic.client.example.extension.DocumentSplitter

Apache Camel and Drools Fusion Integration

Has anyone tried integrating Apache Camel with Drools Fusion or just Drools.
Following is my use case.
Get data from an external service using REST.
Filter the data (using rules defined in Drools.)
The data from the external service could also be a stream of information (e.g., Tweeter feed, real-time location of a user)
Any help or pointers would be appreciated.
Thanks.
Drools has a camel component. Using it is not much different than using any camel component.
source: https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel
binary (in the droolsjbpm-integration bundle): http://www.jboss.org/drools/downloads.html
The only thing to be "aware" of is that Drools can treat camel messages as:
commands
regular facts
as-is objects and re-route then
Some articles:
http://blog.athico.com/search?q=camel
Documentation unfortunately only describes the "command" (1) use case:
http://docs.jboss.org/drools/release/5.4.0.Beta2/droolsjbpm-integration-docs/html/ch01.html
Some test cases you can use as examples for the use cases (2) and (3) above:
https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel/src/test/java/org/drools/camel/component
Hope this helps.

Hbase Stargate REST Interface: How to encode a scanner with filter in XML?

I'm using Hbase over Stargate and want to use a scanner with certain filters. In java or thrift, this would be no problem, but I don't find any advice how to encode the filters in XML. The Schema given in the wiki is invalid, so I'd need one or two Examples how to encode those filters (with AND/OR) in XML.