3 Replies Latest reply on Apr 4, 2018 8:07 AM by Justin Pulley

    Query failing in tableau, but not when I connect via Navicat Premium

    Justin Pulley

      WITH relationship AS (

          SELECT

              object1_number AS cr,

              object2_number AS rco

          FROM

              infrabi_stg.o_infr_dly_plm_relationship_info

          WHERE

              snapshot_day IN (

                  SELECT

                      MAX (snapshot_day)

                  FROM

                      infrabi_stg.o_infr_dly_plm_relationship_info

              )

          AND object1_type = 'Change Request'

          AND object2_type = 'RCO'

          UNION ALL

              SELECT

                  object2_number AS cr,

                  object1_number AS rco

              FROM

                  infrabi_stg.o_infr_dly_plm_relationship_info

              WHERE

                  snapshot_day IN (

                      SELECT

                          MAX (snapshot_day)

                      FROM

                          infrabi_stg.o_infr_dly_plm_relationship_info

                  )

              AND object2_type = 'Change Request'

              AND object1_type = 'RCO'

      ),

      rco_signoff AS (

          SELECT

              *

          FROM

              infrabi_stg.o_infr_dly_plm_signoff_info

          WHERE

              snapshot_day IN (

                  SELECT

                      MAX (snapshot_day)

                  FROM

                      infrabi_stg.o_infr_dly_plm_signoff_info

              )

          AND change_type IN ('RCO')

          AND (

              category LIKE ('%Submittal%')

              OR subcategory LIKE ('%Submittal%')

          )

      ) SELECT

          relationship.rco AS rco_number,

          rco_signoff.description AS "RCO Description",

          rco_signoff.create_date AS "Create Date",

          rco_signoff.signoff_status AS "RCO Status",

          rco_signoff.workflow_status AS "RCO Workflow",

          rco_signoff.assigned_to AS "RCO Assigned To",

          rco_signoff.signoff_comment AS "Signoff Comment",

          rco_signoff.count_weekdays AS "Age (Work Days)",

          relationship.cr AS "CR Number"

      FROM

          rco_signoff

      LEFT JOIN relationship ON rco_signoff.change_number = relationship.rco

      ORDER BY

          rco_number

       

       

      That is the query; it executes without issue in Navicat Premium and Aginity.  Tableau kicks this with "[Amazon][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState XX000] ERROR: unrecognized node type: 407"

      The only results for searches on that error are for OSX and I am on windows.  What could possibly be the issue?