4 Replies Latest reply: Nov 8, 2016 10:21 AM by Daniel Langley RSS

    Hive SQL issue for On-Demand app generation

    Daniel Langley

      Hi everyone,

       

      I know it's a Saturday, but I'm really hoping there are some losers like me out there doing some work/monitoring the Community posts - ha. I'm working on an on-demand app and got the Selection app template built and working. I'm now trying to get the Details app template working but running into a hiccup.

       

      I'm connecting to a Hortonworks Hive table.

       

      Basically, I'm trying to execute the SQL command below and I’m getting the following error:

       

      SQL##f - SqlState: S1000, ErrorCode: 35, ErrorMsg: [Hortonworks][Hardy] (35) Error from server: error code: '0' error message: 'ExecuteStatement finished with operation state: ERROR_STATE'.

       

      SQL SELECT

          mailpiece_id,

          induction_date,

          primary_year,

          primary_month,

          quarter,

          days_to_deliver,

          actual_delivery_days,

          piece_failed,

          area,

          district,

          facility

      FROM HIVE.`default`.spm

      $(WHERE_PART);

       

      Initially, while debugging I kept parsing down the dynamically created WHERE clause [$(WHERE_PART)] until it was an extremely basic where clause (e.g., WHERE facility = "NEW YORK") and that was still producing the error. Then I even hard coded ‘WHERE facility = “New York”’ and received the same error. If I remove the where clause, the sql executes fine, so the problem seems to be within the Where clause.

       

      I’m a little worried because I did some research and found the following Community post:

      https://community.qlik.com/thread/173802

       

      It seems like it’s the same (or very similar) issue and no one has mentioned a solution?

       

      Any ideas out there???