3 Replies Latest reply on Dec 27, 2018 11:04 AM by Jeff D

    ERROR: malformed array literal: ""; Error while executing the query

    Justin Pulley

      Connecting to a postgres db and receiving this error on 2018.3.2

       

      There is no custom query, it is just the table directly.  I don't own or control the postgres instance.  What could the issue be?

        • 1. Re: ERROR: malformed array literal: ""; Error while executing the query
          Jeff D

          Hi Justin, check the log files to see if there's any more detail (Google for "tableau file location" if you need help locating the log files).

          • 2. Re: ERROR: malformed array literal: ""; Error while executing the query
            Justin Pulley

            The log files aren't readable enough, even with Tableau Log Viewer to see anything exactly. Here is the entire error in the popup window.

             

            ERROR: malformed array literal: ""; Error while executing the query

            SELECT (CASE WHEN (NOT ("cm"."actualend" IS NULL)) THEN CAST(((DATE '1970-01-01') + CAST(TRUNC((CASE WHEN 1000 = 0 THEN NULL ELSE CAST("cm"."actualend" AS DOUBLE PRECISION) / 1000 END)) AS BIGINT) * INTERVAL '1 SECOND') AS DATE) ELSE NULL END) AS "Actual Start (copy)", UPPER(CAST((CASE WHEN 2 IS NULL THEN NULL ELSE SUBSTR(CAST("cm"."datacenter" AS TEXT), INT4LARGER(1,CAST(FLOOR(2) AS INTEGER)), INT4LARGER(0,CAST(FLOOR(((CASE WHEN 1 IS NULL THEN NULL WHEN 0 = STRPOS(SUBSTR(CAST("cm"."datacenter" AS TEXT),INT4LARGER(1,CAST(FLOOR(1) AS INTEGER))),CAST('}' AS TEXT)) THEN 0 ELSE (STRPOS(SUBSTR(CAST("cm"."datacenter" AS TEXT),INT4LARGER(1,CAST(FLOOR(1)AS INTEGER))),CAST('}' AS TEXT)) + INT4LARGER(1,CAST(FLOOR(1) AS INTEGER)) - 1) END) - 2)) AS INTEGER))) END) AS TEXT)) AS "Calculation_1021191255963062272", (CASE WHEN 3 >= 0 THEN SUBSTR(CAST(UPPER(CAST((CASE WHEN 2 IS NULL THEN NULL ELSE SUBSTR(CAST("cm"."datacenter" AS TEXT), INT4LARGER(1,CAST(FLOOR(2) AS INTEGER)), INT4LARGER(0,CAST(FLOOR(((CASE WHEN 1 IS NULL THEN NULL WHEN 0 = STRPOS(SUBSTR(CAST("cm"."datacenter" AS TEXT),INT4LARGER(1,CAST(FLOOR(1) AS INTEGER))),CAST('}' AS TEXT)) THEN 0 ELSE (STRPOS(SUBSTR(CAST("cm"."datacenter" AS TEXT),INT4LARGER(1,CAST(FLOOR(1)AS INTEGER))),CAST('}' AS TEXT)) + INT4LARGER(1,CAST(FLOOR(1) AS INTEGER)) - 1) END) - 2)) AS INTEGER))) END) AS TEXT)) AS TEXT), 1, CAST(FLOOR(3) AS INTEGER)) ELSE NULL END) AS "Calculation_1021191255964631041", ('Click the arrow to return to the Map'::text) AS "Calculation_1021191255967199234", (CASE WHEN (STRPOS(CAST("cm"."cmid" AS TEXT),CAST('MCM' AS TEXT)) > 0) THEN 'https://mcm.corp.com/' ELSE 'https://cm.corp.com/' END) AS "Calculation_1021191255968980995", (CASE WHEN (NOT ("cm"."actualstart" IS NULL)) THEN CAST(((DATE '1970-01-01') + CAST(TRUNC((CASE WHEN 1000 = 0 THEN NULL ELSE CAST("cm"."actualstart" AS DOUBLE PRECISION) / 1000 END)) AS BIGINT) * INTERVAL '1 SECOND') AS DATE) ELSE NULL END) AS "Calculation_196751040413327361", ((CAST("cm"."cmid" AS TEXT) || ' - ') || CAST("cm"."tier" AS TEXT)) AS "Calculation_760545390336606208", (CASE WHEN ("cm"."cmid" = '') THEN "cm"."cmid" WHEN ("cm"."datacenter" = '') THEN "cm"."cmid" WHEN ((CASE WHEN 3 >= 0 THEN SUBSTR(CAST(UPPER(CAST((CASE WHEN 2 IS NULL THEN NULL ELSE SUBSTR(CAST("cm"."datacenter" AS TEXT), INT4LARGER(1,CAST(FLOOR(2) AS INTEGER)), INT4LARGER(0,CAST(FLOOR(((CASE WHEN 1 IS NULL THEN NULL WHEN 0 = STRPOS(SUBSTR(CAST("cm"."datacenter" AS TEXT),INT4LARGER(1,CAST(FLOOR(1) AS INTEGER))),CAST('}' AS TEXT)) THEN 0 ELSE (STRPOS(SUBSTR(CAST("cm"."datacenter" AS TEXT),INT4LARGER(1,CAST(FLOOR(1)AS INTEGER))),CAST('}' AS TEXT)) + INT4LARGER(1,CAST(FLOOR(1) AS INTEGER)) - 1) END) - 2)) AS INTEGER))) END) AS TEXT)) AS TEXT), 1, CAST(FLOOR(3) AS INTEGER)) ELSE NULL END) = '') THEN "cm"."cmid" ELSE 'Invalid Search, Please Try Again' END) AS "Calculation_760545390338838529", CAST(((DATE '1970-01-01') + CAST(TRUNC((CASE WHEN 1000 = 0 THEN NULL ELSE CAST("cm"."scheduledstart" AS DOUBLE PRECISION) / 1000 END)) AS BIGINT) * INTERVAL '1 SECOND') AS DATE) AS "Calculation_984036542714454016", 1 AS "Number of Records", CAST(((DATE '1970-01-01') + CAST(TRUNC((CASE WHEN 1000 = 0 THEN NULL ELSE CAST("cm"."scheduledend" AS DOUBLE PRECISION) / 1000 END)) AS BIGINT) * INTERVAL '1 SECOND') AS DATE) AS "Scheduled Start (copy)", CAST("cm"."activitydetails" AS TEXT) AS "activitydetails", "cm"."actualend" AS "actualend", "cm"."actualstart" AS "actualstart", "cm"."approvallevel" AS "approvallevel", "cm"."az" AS "az", "cm"."category" AS "category", CAST("cm"."closurecode" AS TEXT) AS "closurecode", CAST("cm"."closurenote" AS TEXT) AS "closurenote", "cm"."closuretags" AS "closuretags", "cm"."cmid" AS "cmid", "cm"."createdate" AS "createdate", "cm"."createdfromtemplateuuid" AS "createdfromtemplateuuid", "cm"."createdfromtemplateversionuuid" AS "createdfromtemplateversionuuid", "cm"."datacenter" AS "datacenter", "cm"."dctechnicianlogin" AS "dctechnicianlogin", "cm"."dctechnicianneeded" AS "dctechnicianneeded", "cm"."evermodifiedpostapprovaldate" AS "evermodifiedpostapprovaldate", "cm"."fulfillmentcenter" AS "fulfillmentcenter", CAST("cm"."hostnameorservice" AS TEXT) AS "hostnameorservice", "cm"."isevermodifiedpostapproval" AS "isevermodifiedpostapproval", "cm"."ismodifiedpostapproval" AS "ismodifiedpostapproval", "cm"."item" AS "item", CAST("cm"."mcmdescription" AS TEXT) AS "mcmdescription", "cm"."modifieddate" AS "modifieddate", "cm"."modifiedpostapprovaldate" AS "modifiedpostapprovaldate", "cm"."outageminutes" AS "outageminutes", "cm"."region" AS "region", "cm"."requester" AS "requester", "cm"."resolvergroup" AS "resolvergroup", "cm"."scheduledend" AS "scheduledend", "cm"."scheduledstart" AS "scheduledstart", CAST("cm"."status" AS TEXT) AS "status", "cm"."technician" AS "technician", "cm"."tier" AS "tier", CAST("cm"."timeline" AS TEXT) AS "timeline", CAST("cm"."title" AS TEXT) AS "title", "cm"."tostechnicianlogin" AS "tostechnicianlogin", "cm"."tostechnicianneeded" AS "tostechnicianneeded", "cm"."type" AS "type" FROM "conflict"."cm" "cm" LIMIT 1000

             

            This only started happening since 2018.3.1 and on; I never had this issue prior to that.

             

            When I attempt to run this query using Navicat premium in the query window I can isolate the problem to:

             

            WHEN ( "cm"."datacenter" = '' ) THEN

            "cm"."cmid"

             

            and the error it returns is DETAIL:  Array value must start with "{" or dimension information.

             

            keep in mind this is NOT a custom SQL query.  This is simply dragging the table into the connection window.

            • 3. Re: ERROR: malformed array literal: ""; Error while executing the query
              Jeff D

              HI Justin, I suggest you contact Tableau Technical Support for this issue.