Set a quote as a delimiter

05 Base Camper

Set a quote as a delimiter

Hi all,

I want to import in a seperate record a csv file from a call simulator.

The file contains in the first field a timefield, follwing several fields from voice quality like jitter, latency, mos, etc.

The csv file looks like this:

"2/20/2020 2:09:15 PM", 10,2,4.1

"2/20/2020 2:09:16 PM",5,1,4.5

and so on....

 

Without the quote (") in the first field all is fine in the display, but if we leave the quote, all is shift 2 fields right and the first field shows ****** in the display. I guess the delimiter is the problem here.

In the EXT file we use: Delimiters ";,\"" at the moment.

Varios settings to set the quote as a delimtier failed.

Does anyone have an idea ?

 

Thanks and best regards

Swen

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Set a quote as a delimiter

Hi Swen,

 

Not sure if you're using a format to setting the date/time field, e.g.:

SET <field> using "MM/DD/YYYY hh:mm:ss e"

 

If you are, you could try one of the following to see if they help at all:

 

a) Try skipping the double quote with something like

SKIPSTRING "\""

SET <field>

SkipToDelimiters

 

b) Use a regex in the extractor script. I created the following based on the sample data you provided:

 

\"(\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}:\d{1,2} [A|P]M)\",\s*(\d*\.?\d+?),\s*(\d*\.?\d+?),\s*(\d*\.?\d+?)

 

You can find more information on using regular expressions in the extractor script here:

https://help.prognosis.com/prognosis/117/implementing-regular-expressions-in-extractor-scripts-25168...

 

If none of these work and you can provide a copy of your extractor script, record definition and sample .csv, I'm happy to take a closer look.

 

Regards,

Scott

View solution in original post

6 REPLIES 6
Highlighted

Re: Set a quote as a delimiter

hi @Swen_Gross ,

 

Is double quote a delimeter? It seems like you should only have a ',' (comma) as the delimeter.


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Highlighted

Re: Set a quote as a delimiter

Hi Swen,

 

Not sure if you're using a format to setting the date/time field, e.g.:

SET <field> using "MM/DD/YYYY hh:mm:ss e"

 

If you are, you could try one of the following to see if they help at all:

 

a) Try skipping the double quote with something like

SKIPSTRING "\""

SET <field>

SkipToDelimiters

 

b) Use a regex in the extractor script. I created the following based on the sample data you provided:

 

\"(\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{1,2}:\d{1,2} [A|P]M)\",\s*(\d*\.?\d+?),\s*(\d*\.?\d+?),\s*(\d*\.?\d+?)

 

You can find more information on using regular expressions in the extractor script here:

https://help.prognosis.com/prognosis/117/implementing-regular-expressions-in-extractor-scripts-25168...

 

If none of these work and you can provide a copy of your extractor script, record definition and sample .csv, I'm happy to take a closer look.

 

Regards,

Scott

View solution in original post

Highlighted
05 Base Camper

Re: Set a quote as a delimiter

Hi Shoaib,

 

thank ypu, but only use a comma (,) as a delimiter is not a solution here.

 

BR

Swen

Tags (2)
Highlighted
05 Base Camper

Re: Set a quote as a delimiter

Hi Scott,

 

thank you, interessting!

I will test this. At the moment this first field is not set to a date/time format.

 

Best regards,

Swen

 

 

Highlighted
05 Base Camper

Re: Set a quote as a delimiter

Hi Scott,

 

great!!! This was the solition:

 

SKIPSTRING "\""  in the EXT file.

 

The display shows all data now.

Thank you very much!

 

Best regards

Swen

 

 

Highlighted

Re: Set a quote as a delimiter

You're welcome Swen. Glad the information helped get your extractor running the way you needed!

Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Join webinar