Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ltollesonHi Daniel,
I like what Roger has done and I believe it is a scalable option. I use his method often. But in the spirit of being different I can show you another way this can be done.
See the attached example I added to Roger's graph.
Ok, let me explain what is happening in this graph.
- First, the two datasets are concatenated together into a single field. Make sure the field name is the same for both datasets. I called the field "data".
- Since the data already has a delimiter (commas) we can output this single field using the "Output Delimited" node. This node is doing a few tricky things, so let me explain.
- First it is saving the file to the users temp directory. This is done by simply adding a filename without a path. I use this method when a file is only being used as temporary storage in a process.
- This node is outputting just the data, which is the comma separated header and field values, and not the header you see in BRE. This is done by setting the "Field Names" parameter to "None".
- Set the record and field delimiters both to "\n" which will write the entire record as you see it in BRE to the file. Since the data already have commas there is no need to add them on this output node.
- Use the "Delimited File" node to read the data written by the previous step as a comma delimited file. This node must be clocked to the previous "Output Delimited" node so it will run only after the output node has completed.
- Set the "File" parameter to the name used in the "Output Delimited" node.
- Set the "Field Delimiter" parameter to a comma ",".
- Set the "Record Delimiter" parameter to a new line "\n".
Whether or not you use this technique for this application, you will have it in your back pocket for future uses.
Thanks,
Larry
Attachments:
Fieldnames_Values.brg