Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm storing a string into a context variable for later retrieval and use on subsequent records. So I have fileinput -> tMap (to extract this field) -> tJavaRow (context.myinfo = input_row.field1) --- to store the data.
Sometimes the data string will contain a comma. If it contains a comma, when I retrieve the value context.myinfo and output it, I find that everything after the comma (and including the comma) has been removed.
So it the input is "NewCo Boston MA" --- everything works fine
But if the input is "Joe Eats, INC Las Vegas NV" -- upon reading the context variable I get "Joe Eats".
I want the whole string, and its pretty surprising to not get it when all I'm doing is write it to a context and later read it.
If this is a 'special character' that needs to be escaped --- what is the full list of special characters?
Would setGlobalVar get me around this, or would it have the same problem?
Thanks!
tJavaRow4 saves the current record for later use... see the Java code image
tMap16 picks up the "datarecord_prior" from the context.
This goofy file format splits a single record into two lines, so it is necessary to join line 1 to line 2, then 3 to 4, etc.
When the input line contains a comma, when that is saved / retrieved from the context variable everything from the comma onward is lost.
You are using a tFileInputDelimited component to read this data in. Are you using a comma as a separator in that component? If so, that is your problem
Could you attach some screenshots of your implementation/data?
You are using a tFileInputDelimited component to read this data in. Are you using a comma as a separator in that component? If so, that is your problem
oh, snap! Thank you!