Does anyone have any good suggestions how to potentially split a text file into two different data tables using Generate Data Table or another activity? The two data tables would have to use different delimiters to separate the columns, one splits on a “:” and the other splits on “,”.
Here is an example file I created. I would want to take everything with “test” in it and make a datatable out of that. And then take everything with “example” in it and create a separate datatable
There is a second empty line which should really be the splitting point. Also if possible, I need the first data table to use the values before the colon as the field names. So it would be 12 fields with 1 row of data each
Since it will be always be two Datatables/ two tables to extract from the Text file.
We would require to Understand the Delimiter between two tables. Here in this case, we could take the Delimiter as example since it is the Starting Point of the Table2.
Where we assume that the example word is unique for the Table2.
We could then Split the Text file based on this Delimiter, splitting two tables.
We then Pass the Splitted texts into Generate Datatable Activity with it’s respective Column Separators to Generate two Datatables.
Check the workflow Below and Let us know about the delimiter in the actual data, or whether the Starting Data of Table2 is Good enough to be the Delimiter. Extract_DT_FromText.xaml (6.4 KB)
The first “word” of the second data table is not always going to be the same, I was just creating example text to show what needs to be in the first data table and what needs to be in the second
@Rangu_Pranaviteja The “example” portion of the data is working perfectly. Thank you
However the “test” part of the data is formatting wrong when put into a for each because it is appending the data for each line instead of doing it all at once
The “test” portion is outputting like this for one singular file
Instead of like this
See how it is appending each line? I am trying to change some things in order to figure it out as well
I think we need not put further for each since it would work for n number of (test : test) like data. Please verify without modifications and confirm if it looks good.