Link to home
Start Free TrialLog in
Avatar of KathleenR
KathleenRFlag for United States of America

asked on

Parse and text to columns of text file.

Hello,
The goal is to get the data into a sql table. I just need help parsing the text file into 2 columns, multi row.  I don't care how they are delineated I can figure out the import side.
 I have written python, t-sql and powershell so ideally the solution would use one of those tools.

The files are not large and are text files.  Assume I'll need to run process once a month but not consistently.
Data between {} is one record, 2 columns.  No cr at row end.

There can be any number of filenames in the text file with 0 to 30 pieces of information so empty [] is a possibility.  
I want each comma separated value in information to be a new row.  i want all {'': to be removed

example:Input  shows 2 records
{'filename':'colors','information':[red,blue,yellow]}, {'filename':'colors','information':[pink,orange]}, etc.

required output  for first one
filename    Information
colors        red
colors        blue
colors        yellow
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KathleenR

ASKER

Thank you slightwv, that will work perfectly.