Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: jmorrissetteI'm guessing this is simple but I cant seem to find the answer.
This post (
http://community.lavastorm.com/archi...php/t-163.html) seems to have given me a hint, but I cant seem to get this to work the way that I want. I am combining two data sets, lets call them User and Licenses. The User records contain a field called Activtations that is a multi line free text field which contains license keys. Sometimes the Activations field contains a single key and sometimes it contains multiple keys separated by spaces, commas, carriage returns and other unpredictable deliniators. To make it worse, sometimes the Activations field also contains other chaf such as notes as to how the keys were used. None the less I need to combine the two data sets using the Activation as the join. The bright spot is that the Activation field in License is well formatted and always contains one good key.
So here is a sample data set:
[License]
Activation:string, StartDate:string
"12345", 3/13/15
"12346", 3/14/15
"12347", 3/15/15
"12348", 3/16/15
"12349", 3/17/15
[User]
Name:string , Activations:string
"Bob","12345"
"Tom","12346, 12347"
"Allan","12348;12349 I sent this key yesterday"
The resulting output should be:
[Output]
Activation:string, StartDate:string, Name:string
"12345" , "3/13/15", "Bob"
"12346" , "3/14/15", "Tom"
"12347" , "3/15/15", "Tom"
"12348" , "3/16/15", "Allan"
"12349" , "3/17/15", "Allan"
I tried using an X-Ref Node with this output:
output 1 {
emit 1:*
where join.leftOrphan
}
output 2 {
emit *
where join.match
}
output 3 {
emit *
where strFind(2:Activations,1:Activation) >= 0
}
but it does not produce the correct results.
If it was working correctly pin 3 would contain the full output whereas pin 2 would contain just Bob's record. However Pins 2 and 3 work identically, only containing Bob.
Keep in mind in the production use case both sets of data would contain up to 100k rows and the graph would run several times per day.
Thoughts?
Attachments:
test.brg