Delphix Products

 View Only
  • 1.  Casting on Postgres columns

    Posted 02-19-2021 05:49:00 AM
    While i try to mask columns  in Postgres, it gives error on JSON, Jsonb,  BIT datatypes which are not needed to mask as per requirement. Below are the errors, since data in the data is of different datatype.
    1. ERROR: column "xyz" is of type bit but expression is of type boolean . Column has True/False as values. Column  datatype is BIT in source and destination db

    2. ERROR: column "json_c" is of type jsonb but expression is of type character varying. Column has JSON values in it like {"a": 0.01, "b": 3, "c": 1.0, "t": 0} . Column  datatype is Jsonb in source and destination db

    If i cast them like below, i get the same errors.
    CAST(json_c AS Jsonb)
    CAST(xyz AS BOOLEAN)

    I feel Delphix should have casted them internally looking at the source and destination table structure.  Because it seems, for SQL casting is taken care by Delphix itself. i can see select queries with cast function in ruleset. Kindly suggest how should we move ahead.

    ------------------------------
    eera joshi
    Delphix Community Members
    ------------------------------


  • 2.  RE: Casting on Postgres columns

    Posted 02-19-2021 08:58:00 PM
    Can someone help me on this concern ASAP

    ------------------------------
    eera joshi
    Community Member
    American Express
    ------------------------------



  • 3.  RE: Casting on Postgres columns

    Posted 02-24-2021 03:41:00 PM
    Hi Eera, it's likely that Postgres is not allowing a string value coming out of the algorithm to be updated into the column. I'll contact you directly, the log file may have more info to determine if this is what is happening.

    ------------------------------
    Robert Patten
    Principal Data Privacy Specialist
    Delphix
    ------------------------------