4 Replies Latest reply on Oct 27, 2017 6:13 PM by rareddy

    Error: Inproper results returned.  Expected 5 columns, but was 2

    shiloh.jordan

      I have 3 source and 3 view models that were created when I imported my 3 text files.  My source models use the getTextFiles() procedure and I was getting error "Inproper results returned. Expected 5 columns, but was 2" ... I did some research online and found that this is a bug with certain Designer versions.  ([TEIIDDES-3107] Source model for file is not generated properly - JBoss Issue Tracker )

       

      My first question is:  Do you know what version this bug will be fixed?  I am using Teiid Designer 11.1 (the latest) so I am wondering why I still see this error.

       

      As a temporary workaround, I have removed 3 columns("lastModified", "created", "size") from the getTextFiles() procedure result from just one of my source models so now it just returns "file" and "filePath".  The issue has been resolved.

       

      But my next question is:  Why did the issue resolve by just removing the 3 getTextFiles() procedure result columns from just ONE of my source models, and not all 3 of them?

       

       

      All help is much appreciated

       

      Thanks,

      Shiloh

        • 1. Re: Error: Inproper results returned.  Expected 5 columns, but was 2
          shawkins

          > I am using Teiid Designer 11.1 (the latest) so I am wondering why I still see this error.

           

          It is marked as resolved in 11.1.1

           

          The expectation is that Designer will only add those columns for Teiid versions that support the extended functionality.  The bug should only be observed when the columns are added by Designer, but the runtime does not support returning them.

           

          If you use the metadata with just the two columns defined the server logic will understand that regardless of the version.

           

          If you use a -vdb.xml that excludes defining the source model, you will either get the behavior you expect or a clearer error as the procedure metadata will be defined by the runtime.

           

          > But my next question is:  Why did the issue resolve by just removing the 3 getTextFiles() procedure result columns from just ONE of my source models, and not all 3 of them?

           

          This is a runtime error, are you invoking all three?

          1 of 1 people found this helpful
          • 2. Re: Error: Inproper results returned.  Expected 5 columns, but was 2
            shiloh.jordan

            Hi Steven,

            I did not add those columns in Designer, they were added automatically when I imported my text file using getTextFiles() procedure. My Teiid Designer version is 11.1 and is compatible with Teiid 9.0 release, so that means that the Designer should have just added the columns specific to Teiid version (9.0)

             

            When I look at download website, I see 11.1.0 is the final release.  Where do I find the 11.1.1 Teiid Designer version?

             

            To answer your next question, yes

            My REST procedure invokes 3 other procedures that look at the 3 source models, so yes, I am using all 3 source models.  Any ideas why I did not have to remove the columns for the other 2 models?

            • 3. Re: Error: Inproper results returned.  Expected 5 columns, but was 2
              shiloh.jordan

              rareddy

              May I have your input on this issue?

              • 4. Re: Error: Inproper results returned.  Expected 5 columns, but was 2
                rareddy

                11.1.1 is not released yet.

                 

                I am not sure if you provide the DDL version of the VDB we can take a look. Unless your parent directory is different for each one, you technically only need one "file" based model. The reason it may be working is if model name prefix is not used like

                 

                file.getTextFiles(....)

                file2.getTextFiles(...)

                 

                Then they resolve to matching procedure.