Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Flat File Double Quotes
harish
We have a legacy software which generates log files which are space delimited. Some of the lines have double quotes ("). The default flat file datasource supports only PSV, SSV, CSV and TSV. What do I need to do to use space delimited file data source. Do I need to write a custom ODA driver or can I do some minor modifications to the existing flat file driver and use the same. How can I do the same?
Also I see that double quotes cause parsing problems and I get invalid file format when I try to use the same.
Find more posts tagged with
Comments
mwilliams
Hi harish,
One possibility for you would be to create a scripted dataSource and step through the file with java.
The other way would be to modify to open-source code, like you said, to include the option for the space delimited flat file input.
Hope this helps.
veerababuk
Hi,
I have a problem in generating CSV reports, the output is comming as follows:
"aaaaa,bbbbb,cccccc,dddddd"
",,,"
"123,456,789,321"
How can we avoid these double quotes.
I am expecting as followes:
aaaaa,bbbbb,cccccc,dddddd
,,,
123,456,789,321
Can any one help me in getting the CSV report in expected format.
Thanks,
Veerababu K
mwilliams
Hi Veerababu K,
What does your flat file actually look like? Are there double quotes surrounding the lines in it?
veerababuk
Hi Williams,
I have attached a TXT file showing CSV output, please look into it.
Expected output is:
line 1: aaaaa,bbbbb,cccccc,dddddd
line 2: ,,,
line 3: 123,456,789,321
But I am getting as:
line 1: "aaaaa,bbbbb,cccccc,dddddd"
line 2: ",,,"
line 3: "123,456,789,321"
Can we avoid " (Quotes) enclosing lines?
Thanks & Regards,
Veerababu K
mwilliams
Veerababu K,
If the issue is just in displaying, you could run a replace of the " with an empty string ("").