Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multiple delimeters or combination of Fixed/Delimited?

Hi

Using QV v11.2

I am bringing a csv file into the table view.  Neither delimited or fixed seems to quite do the job.

The file mainly lends itself to fixed column, but ideally I would like also to have "#" and ":" as delimiters.

Is it possible to use a combination of fixed and delimited?

Is it possible to use more than one delimiter??

Failing all of this, do I have to parse the data twice and what might the script for that look like

Thanks

1 Solution

Accepted Solutions
marcus_sommer

One possibility could be to load the data with one delimiter, store it as txt-file and load it again with the next delimiter. Another approach would be to load the data without a delimiter and using various string-functions to correct the delimiter, for example with replace() and store and loading it again.

Without knowing how the data should look like after the transformation it's difficult to say more especially if it should be quite performant because of the amounts of data - whereby if you could create from the data an unique-key you will be able to use incremental approaches and the performance won't be so important as before.

- Marcus

View solution in original post

7 Replies
marcus_sommer

Multiple delimiters aren't possible but with a chain of several loads should it be possible.

- Marcus

Anonymous
Not applicable
Author

Thanks Marcus.

I thought so....is there a quick example of that you could point me at.

If I load the first table, is there a wizard to allow me to find that load and re-input it?

Sergey_Shuklin
Specialist
Specialist

Hello, Gerald!

There is a way, but it's cruel!

You can use a SubField() function and set a second parameter of it is '#:'. It will take a time to name all fields but it works.

marcus_sommer

Please provide a few sample records (in your origin file-format) and how they should be resolved respectively how the result should look like.

- Marcus

Anonymous
Not applicable
Author

two files..before and after

The actual source file is huge  3gb.  So any transformation probably needs to be lightweight.

Anonymous
Not applicable
Author

Thanks Sergey,

I am just pursuing the other thread at the moment, but will return to this as soon as I can.

I should have mentioned this is a huge, narrow but tall file.   Is SubField resource intensive?  If so it might not suit.

Gerald

marcus_sommer

One possibility could be to load the data with one delimiter, store it as txt-file and load it again with the next delimiter. Another approach would be to load the data without a delimiter and using various string-functions to correct the delimiter, for example with replace() and store and loading it again.

Without knowing how the data should look like after the transformation it's difficult to say more especially if it should be quite performant because of the amounts of data - whereby if you could create from the data an unique-key you will be able to use incremental approaches and the performance won't be so important as before.

- Marcus