-
1. Re: How to connect to and retrieve data from CSV files using Teiid?
shawkins Nov 25, 2014 7:11 AM (in response to tarifezaz)1 of 1 people found this helpfulTeiid does not perform auto discovery of your text file contents. When you add a file source all that provides are procedures for accessing files on the filesystem - File Translator - Teiid 8.10 (draft) - Project Documentation Editor. From there you would use TEXTTABLE - FROM Clause - Teiid 8.10 (draft) - Project Documentation Editor
Teiid Designer does provide wizard based help for setting utilizing TEXTTABLE as well.
-
2. Re: How to connect to and retrieve data from CSV files using Teiid?
blafond Nov 25, 2014 8:34 AM (in response to shawkins)1 of 1 people found this helpfulYou can find instructions in this example: Connect to a Flat File using Teiid
-
3. Re: How to connect to and retrieve data from CSV files using Teiid?
rareddy Nov 25, 2014 9:37 AM (in response to blafond)If you want to use the Dynamic VDB here is an example as to how to do it Text to Table with Teiid
-
4. Re: How to connect to and retrieve data from CSV files using Teiid?
tarifezaz Nov 26, 2014 1:27 AM (in response to rareddy)Thanks guys. I'll try them and will let you the updates.
-
5. Re: How to connect to and retrieve data from CSV files using Teiid?
tarifezaz Dec 8, 2014 6:10 AM (in response to tarifezaz)Ramesh, I have tried your tutorial, but I am having the following error:
org.teiid.jdbc.TeiidSQLException: TEIID30352 MARKETDATA.GETTEXTFILES does not exist.;
But I already saved my table inside "home/tarif/testing" directory.
What should I do? I have been using Teiid 8.8.0 and JBoss EAP 6.1.0
-
6. Re: How to connect to and retrieve data from CSV files using Teiid?
rareddy Dec 8, 2014 10:14 AM (in response to tarifezaz)Per your VDB XML above, the transformation needs to be "fileModel.getTextFiles" in your view or source query. BTW, what is query you are executing.
-
7. Re: How to connect to and retrieve data from CSV files using Teiid?
tarifezaz Dec 16, 2014 11:33 PM (in response to rareddy)Thank you Ramesh, it finally worked! My query was:
select stock.* from (call fileModel.getTextFiles('*.txt')) f, TEXTTABLE(f.file COLUMNS symbol string, price double HEADER) stock It's from your tutorial. Thanks again!
-
8. Re: How to connect to and retrieve data from CSV files using Teiid?
tarifezaz Dec 18, 2014 12:57 AM (in response to tarifezaz)Hi Ramesh, I have read in your comment that the file translator is read-only. Is there any workaround that come out lately?
-
9. Re: How to connect to and retrieve data from CSV files using Teiid?
shawkins Dec 18, 2014 7:58 AM (in response to tarifezaz)The file translator/resource adapter also have write methods, but that is at the whole file level. That does not provide an easy path to updates into a csv file as you would have to write instead of triggers for the view containing texttable and update the entire contents. If you are looking for a table that is backed by a csv file, then it may be looking at integrating that functionality through hsql - http://hsqldb.org/doc/guide/texttables-chapt.html
-
10. Re: How to connect to and retrieve data from CSV files using Teiid?
tarifezaz Dec 21, 2014 8:32 AM (in response to shawkins)Thanks Steven. I have been trying out HSQL, I hope it will serve my purpose!