Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Multiple delimiters aren't possible but with a chain of several loads should it be possible.
- Marcus
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?
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.
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
two files..before and after
The actual source file is huge 3gb. So any transformation probably needs to be lightweight.
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
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