3 Replies Latest reply on Mar 9, 2018 8:50 AM by Ramesh Reddy

    Teiid how to access multiple files from local machines.

    kulbhushan chaskar Master



      I am using teiid 9.1.3 and wildfly 10.0.0


      I am trying to access files from local machine directory. for a single file it works fine, but how I can execute such query on multiple files at a same time?


      Sample query:


      select_par_sql = "SELECT count(SampleSourceFile.StratDesc) from (call department.getTextFiles('*.txt')) f, "+  

      "TEXTTABLE(f.file COLUMNS InvAssetType string, InvType string,InvAssetTypeUserDef string, StratDesc string   DELIMITER '|' HEADER) SampleSourceFile where InvAssetType IN('CSH', 'CASHEQ', 'EQYNLT') AND InvType = 'NONTRADEEXP' AND InvAssetTypeUserDef != 'nonOTC';";


      In above query SampleSourceFile.txt is the file name.



      Kulbhushan Chaskar