Importing multiple text/csv files without using the RDF file.

15 posts / 0 new
Last post
Smiso
Offline
Joined: 03/07/2019 - 03:05

Hi Scott
 
Thank you very much for your response.
 
I have tested the script and i dont think its working. I ran the script using just two files and i recieved the attached error message. Please advise if i may be missing something.
 
I tried every possible scenario that may make the script not work, in terms of he delimiter and the encapsulator, however, nohing worked. Please test on your side as well, to see if we get the same results.
 
Regards.

Images: 
scotchy33
Offline
Joined: 09/05/2012 - 15:51

Hi Smiso,
The script was successful with the test files you sent me.
The script should automatically detect delimiter in files and also if there is encapsulation.
Scott

Images: 
avikerem's picture
avikerem
Offline
Joined: 04/07/2015 - 00:28

Hi
Using the idea "Desktop" function one can create a database from a txt or csv file without providing RDF mask. the "desktop" function will detect all fields, delimited by comma or tab, and will create a database with field names CHAR1 to CHARn and will also create an RDF mask for the imported file. In this case the newborn RDF file will have the name of the created database
Howevere when trying to use the macro Client.ImportDelimFile seems that this function does not support ommitted RDF file.
Is RDF file parameter mandatory?
If this is the case and RDF file is mandatory for client.ImportDelimFile, is there a macro workaround to import a file of type txt or csv when the name of the file is provided to the macro only at run time?
Thanks a lot and have a wonderful weekend
Avi Kerem

avikerem's picture
avikerem
Offline
Joined: 04/07/2015 - 00:28

Two comments
1. I am using IDEA version 10.3 but I am not sure 10.4 will help since I am not interested at all in the RDF file, all I need is that the imported file will be imported preserving the field structure as defined by the .txt (tab delimited) or .csv (comma separated)
2. my current workaround is to create an rdf file with a specific name like "Generic" with enough fields to cover for the widest possible  input file and after the import to rename create correct field names and remove extra fields for each specific file imported. this is painful and kludgy...

Pages