Mixpanel Community Icon

Fixing Device Properties Ingestion: Convert String to Object Type in Mixpanel

·
·

Hi community, we are ingesting multiple events with a certain field device_properties . All events sent this field as an object type except for one where its defined as a string by mistake. We would like to fix this by also changing the string to an object type in this event. Whats the easiest way to achieve this?

  • I assume a cast in the existing ingest will not work?

  • Is there a workaround inside mixpanel maybe without touching the ingest itself?

  • Avatar of Josh L.
    Josh L.
    ·
    ·

    Hey Conrad C. this sounds like a job for a super property so you can maintain just one property, instead of several.

  • Avatar of Conrad F.
    Conrad F.
    ·
    ·

    thanks Josh L.. Actually the wrong type cast happens in the selection from our database (we ingest from our data warehouse into mixpanel). Any suggestions here?

  • Avatar of Josh L.
    Josh L.
    ·
    ·

    Conrad C. so your data warehouse is insisting on the string function?

  • Avatar of Conrad F.
    Conrad F.
    ·
    ·

    no, its an implementation mistake. We could cast it in this one event also to object. I'm just wondering if Mixpanel will simply accept the type change for this field

  • Avatar of Josh L.
    Josh L.
    ·
    ·

    Oh so it will accept what you want to send to it, as long as it is as per the documentation. However, you will see this as a new property once you make the correction

  • Avatar of Josh L.
    Josh L.
    ·
    ·

    as long as you know that and can make adjustments you should be good

  • Avatar of Conrad F.
    Conrad F.
    ·
    ·

    ok, it will obviously still have the same column name, thats why I was concerned. But good to know, then we'll simply change the data typecast for the field when we fetch data from the data warehouse.

  • Avatar of Josh L.
    Josh L.
    ·
    ·

    Great Conrad C.!

  • Avatar of Christopher C.
    Christopher C.
    ·
    ·

    Possible you might be able to get away with casting it within Mixpanel? Would need to be re-casted each query though AFAIK

  • Avatar of Conrad F.
    Conrad F.
    ·
    ·

    thanks Christopher C., unfortunately that didn't solve it