2 Replies Latest reply on Jun 20, 2013 8:27 AM by devin pinkston

    file - delegating translator

    devin pinkston Newbie

      If I have a flat file (txt) file, which I create a view off of, but want to use the same delegating translator I use with Hadoop/Oracle/Postgres should it work in theory?

       

      Basically I override the createexcecution method in my delegator, and it works perfectly with the other sources.  However with flat files, it seems to not enter the delegating translator.  Do I need to create a virtual procedure since I creat a view (texttable) off of the txt file?

       

      My flat file source:

      <model name="fileCleaner">

       

              <source name="text-connector" translator-name="file-delegator" connection-jndi-name="java:/cleaner-file"/>

       

          </model>

       

      <model visible = "true" type = "VIRTUAL" name = "weatherstats">

              <metadata type = "DDL"><![CDATA[ 

                  CREATE VIEW cleanFile (

                  nyOne varchar(40),

                  nyTwo varchar(40),

                  nyThree varchar(40),

                  nyFour varchar(40)

                  ) AS

                  select cleanFile.* from (call fileCleaner.getTextFiles('newyork.txt')) f, TEXTTABLE(f.file COLUMNS nyOne varchar(40), nyTwo varchar(40), nyThree varchar(40), nyFour varchar(40)HEADER) cleanFile;

                  ]]>

              </metadata>

          </model>

       

      So i query "select * from cleanFile", i am returning results, but my delegating translator is not modifying the results as it does with other data sources.

       

      Thanks!