10 Replies Latest reply on Oct 18, 2016 12:19 PM by Luciano Vasconcelos

    Error while extracting Data?

    Hitesh Rajpurohit

      Hi,

      I'm able to fetch data live and also able to create worksheets and dashboard but I'm not able to extract data.

      while extracting I'm getting this error

      Thank you,

      Hitesh Rajpurohit

        • 1. Re: Error while extracting Data?
          Dmitry Chirkov

          Could you please query behind "Show Query" button?

          Any extra options on the extract?

           

          Also, what version are you using?

          • 2. Re: Error while extracting Data?
            Hitesh Rajpurohit

            Hi Dmitry,

            This is the query i'm using

            SELECT "TableauSQL"."3" AS "3",

              "TableauSQL"."4" AS "4",

              "TableauSQL"."5" AS "5",

              "TableauSQL"."FIRST_NAME" AS "FIRST_NAME",

              "TableauSQL"."GROUPNAME" AS "GROUPNAME",

              "TableauSQL"."ID" AS "ID",

              "TableauSQL"."RULEEXECUTABLENAME" AS "RULEEXECUTABLENAME",

              "TableauSQL"."RULEMETORNOTMET" AS "RULEMETORNOTMET",

              "TableauSQL"."ZIP" AS "ZIP"

            FROM (

              select id,first_name,null,null,null,rulemetornotmet,ruleexecutablename,groupname,zip from TABLEAU_NEW_3 as TABLEAU_NEW_3

              union all

              select id,first_name,last_name,marital_status,phone,rulemetornotmet,ruleexecutablename,groupname,null from TABLEAU_NEW_4 as TABLEAU_NEW_4

            ) "TableauSQL"

            FETCH FIRST 10000 ROWS ONLY

            Can you please help me this?

            Thank you,

            Hitesh

            • 3. Re: Error while extracting Data?
              Dmitry Chirkov

              This looks like a query for data grid on the Data Source tab, not for extract.

              Where did you get it from? Error dialog or logs?

               

              Query I'm looking for should be wrapped in another SELECT:

              SELECT 1 AS "Number of Records",
                ...
              FROM (
                <your SQL>
              ) "Custom SQL Query"
              

               

              Can you find that query, please?

               

              Also, any extra options on the extract?

              • 4. Re: Error while extracting Data?
                Hitesh Rajpurohit

                Hi Dmitry,

                Thanks for the help

                "select id,first_name,null,null,null,rulemetornotmet,ruleexecutablename,groupname,zip from TABLEAU_NEW_3 as TABLEAU_NEW_3

                union all

                select id,first_name,last_name,marital_status,phone,rulemetornotmet,ruleexecutablename,groupname,null from TABLEAU_NEW_4 as TABLEAU_NEW_4"

                this is the query i'm using.

                No extra option on extract.

                Thank you.

                • 5. Re: Error while extracting Data?
                  Dmitry Chirkov

                  This is not the query I'm looking for.

                  I need a failing query from the log that produces error you mentioned.

                  • 6. Re: Error while extracting Data?
                    Hitesh Rajpurohit

                    Above mentioned query is I guess the failing query (question raised on 14th october).

                    Thank you

                    • 7. Re: Error while extracting Data?
                      Dmitry Chirkov

                      Unfortunately, no.

                      First, it does not contain object in question (Custom SQL Query.11)

                      Second, it's not the query I'm looking for. I mentioned query 'template' I'm looking for here.

                      • 8. Re: Error while extracting Data?
                        Luciano Vasconcelos

                        Hitesh, this error occurs usually when you don't have a column anymore or column name was changed.

                        I suggest you to comment one line and test until find the wrong reference.

                         

                         

                        Short Description: IS NOT VALID IN THE CONTEXT WHERE IT IS USED

                         

                        name is not valid in the context where it was specified. This error can occur for the following situations: v The specified column is not a column of any of the source or target tables or views of the statement. – In a SELECT or DELETE statement, the specified column is not a column of any of the tables or views that are identified in a FROM clause in the statement. – A column list of an SQL data change statement specified the name of a column of the target table or view of the statement.v A VALUES clause of an SQL data change statement specified the name of a column of the target table. v The left side of an assignment clause of an SQL data change statement specified a column that is not a column of the target table or view of the statement, or an INCLUDE column defined for the statement. For a DELETE statement, the target of an assignment clause can only be an INCLUDE column. v The right side of an assignment clause of an SQL data change statement referenced an INCLUDE column for expression. A column defined in an INCLUDE clause can only be specified on the left side of an assignment in an SQL data change statement. v A column defined in the INCLUDE clause of an UPDATE or DELETE statement was referenced in the WHERE clause of that statement. v A qualified column name was specified, but the table designator that is specified as the qualifier is not defined in this context. v For a GROUP BY clause, a correlated reference to a column was specified for a grouping expression, which is not allowed. v For an ORDER BY clause, the specified column is a correlated column reference in a subselect, which is not allowed. v A correlated reference to a column was specified in an OLAP specification. Each column name that is referenced in an OLAP specification must unambiguously reference a column of the result table of the subselect that contains the OLAP specification. v For a CREATE TRIGGER statement, – A reference is made to a column using an OLD or NEW correlation name. The column name is not defined in the triggering table. – The left side of an assignment in the SET transition-variable statement in the triggered action specified an old transition-variable that is not valid for the type of trigger. – The reference name does not resolve to the name of a column or transition-variable.System action: The statement cannot be processed. Programmer response: Verify that the column and table designators are specified correctly in the SQL statement. In the case of a SELECT statement, verify that all of the required tables or views were named in the FROM clause. If the column was intended to be a correlated reference, qualify the column with the correct table designator. For an ORDER BY clause, ensure that there are no correlated column references. In the case of a CREATE TRIGGER statement, ensure that only new transition variables are specified on the left side of assignments in a SET transition-variable statement and that any reference to columns of the triggering table are qualified with a transition-variable correlation name. For a DELETE statement, ensure that only columns defined in the INCLUDE clause are specified on the left side of assignments.

                        • 9. Re: Error while extracting Data?
                          Dmitry Chirkov

                          That's coming from Data Grid query (i.e. show 10000 rows), not his Custom SQL.

                          • 10. Re: Error while extracting Data?
                            Luciano Vasconcelos

                            Fine, but error is the same(sqlstate_42703).

                            This seems to be a column reference problem.