8 Replies Latest reply: Jan 8, 2014 3:58 PM by John Lifter RSS

    Read directory issues

      John,

        I am trying to use the ReadDirectory library from the extension SDK example.  It does just what I need it to do.

      So I created a new library and used the Read Directory operator.  Yesterday the data flow in the screen shot I am attaching was working great and today it isn't even green. I did not change anything just opened it.

       

        So then I thought I would just write a dataflow in the readdirectory library and maybe that would work better.

        The dataflow looks good but when I run it I get the following output.  I don't know what that means The process tried to write to a nonexistent pipe.

       

        Any ideas.  Thanks Traci

       

       

      "C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121019.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121019.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121102.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121102.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121116.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121116.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121126.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121126.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121130.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121130.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121205_20130102_091943.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121205_20130102_091943.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121214_20130109_020217.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121214_20130109_020217.csv.

       

      C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121228_20130110_112254.csv

       

       

      The process tried to write to a nonexistent pipe.

      Error occurred while processing: C:\ClientFiles\KWIKTrip\2012\todo\KwikTrip_ClientPR_20121228_20130110_112254.csv.

        <status>failed</status>

      </step>

      <statistic>0.281</statistic>

      </task>

      dataflow controller - ETASK-0038-F: Processing has completed abnormally. (KWIKTrip.controller)

      "

        • Re: Read directory issues

          It looks to me as if the dataflow in the extension library requires schemas that are not contained in the library (probably still in the original project).

           

          You need to copy the schema(s) into the library and then re-select them in the operator controls

            • Re: Read directory issues

              Can’t attach now again on the thread.  Here is the zip of the library plus one test data file.

               

               

               

              Thanks Traci

                • Re: Read directory issues

                  I can't tell whether what you've sent.  Is it the boiler plate generated code, the code from the examples attached to the knowledge base article, or code you are working on.

                   

                  In any event, why are you trying to use the SDK extension to read and process a straight-forward CSV file?  Expressor can easily process CSV files.  The SDK is meant to be used to implement functionality that is not already included in Expressor.

                    • Re: Read directory issues

                      John,

                       

                        Yes I read csv’s all the time.  I need additional functionality to read and process a entire directory of .csv’s.

                       

                      I followed the intstructions in QlikView Expressor Extension SDK for ReadDirectory.

                       

                      But I can’t it to run even though I’m sure I followed the directions.

                       

                       

                       

                      Thanks Traci

                        • Re: Read directory issues

                          In the knowledge base article, the discussion of using the Read Custom operator (page 7) allows you to do the same thing with much less coding.  The only consideration is that you will need to hardcode the header field names (line 4) and the file system location of the files.

                           

                          The listing of files to read (line 9) can be passed into the application as a parameter (configuration artifact) variable.  This isn't quite as convenient as having the extension retrieve the names of the files, but it will accomplish the same thing.

                           

                          Alternatively, look at the code on page 11, lines 27-36.  You could use this code to transparently build up a list of the files to process and avoid using a configuration artifact.

                           

                          Finally, the code on pages 24-25 shows you how to look for and skip header rows.

                           

                          Note that all these approaches use the same coding as in the more advanced SDK examples within the basic Read Custom operator. They will accomplish the same thing while avoiding working with the SDK related modules.

                           

                          If you want to continue working with the SDK, try using the example code in the zip file that is attached to the knowledge base article as your starting point  (http://community.qlik.com/docs/DOC-4271).

                           

                          Trouble-shooting coding as involved as the SDK is not something we can accomplish through the community.

                  • Re: Read directory issues

                    John,

                      There is something more than that going on.  I re-created the read directory extension from scratch on my local machine (a different machine than where the error occurred).  I am confident the schema is in the  correct and same directory and I am getting that same error here.

                    Can you take a look I'm attaching the zip of the project along with one test csv.

                    Thanks Traci

                    • Re: Read directory issues

                      I was able to get it to work using read directory, thank you.