Skip to main content

Having trouble marking columns as timestamps

Comments

1 comment

  • Alon Brody

    I looked through the key:value rotation used to create the “public”.“hubspot_contact_properties_primary_v2_roman” view, and noticed the following:

    "max"( ( (CASE
    WHEN (
        (
          hubspot_contacts_properties."key"
        )
        :: text = ('createdate' :: character VARYING) :: text
      )
      THEN
      ( '1970-01-01 00:00:00' :: timestamp without time zone + ( ( ( (hubspot_contacts_properties.value) :: bigint / 1000 ) ) :: DOUBLE PRECISION * '00:00:01' :: interval ) )
      ELSE NULL :: timestamp without time zone
    END ) :: character VARYING ) :: text ) AS createdate,
    

    Looks like it was casting the column name as a text column. I changed that to timestamp without time zone and now it works as it should.

    0

Please sign in to leave a comment.

Powered by Zendesk