Hi RudderStackers, I hope you are all doing well....
# support
c
Hi RudderStackers, I hope you are all doing well. Here is our problem: We have been using RudderStack about 1.5 years and for the last two days, we are now getting guids where we used to get ids for our Pipedrive resources (deals, organizations, persons). --------------------------------------------------------------------------- Here is our configuration: We use the Enterprise version of RudderStack -Source: Pipedrive -Destination: SQL Server in Azure --------------------------------------------------------------------------- Details about the guids: As an example, when I look at the deals that come in to SQL Server, I see guids for the ids (picture 1). Deals are one of the resources that are being integrated with SQL Server (picture 2). This was not occurring before 12/4/2022 (this query results in an empty set): select update_time, id deal_id, * FROM pipedrive_deals WHERE try_cast(id as bigint) is null and update_time < DATEFROMPARTS(2022,12,4) order by 1 desc; All resources from Pipedrive appear to be doing this (e.g. organizations). If we look at any resource before the 4th of December, we see bigints for the id datatype (picture 3). When I perform postman checks to confirm that the Pipedrive api version 1 is returning bigints and not guids, I see bigints returned: https://api.pipedrive.com/v1/deals/24451?api_token=blah_blah_blah_token { "success": true, "data": { "id": 24451, "creator_user_id": { "id": 9450711, "name": "Jane Bobby Doe", "email": "jbobbydoe@rft.com", "has_pic": 1, "pic_hash": "d83a2e0bc9913cbc7ee9dace3bc60d64", "active_flag": true, "value": 9450711 }, … Consequently, I think something is going wrong with the interface. Has anyone seen this and does anyone have direction on how to fix this? Thanks, Patrick
c
I've just encountered this exact same issue in the last day or two. Our IDs are not being passed through as the numerical IDs. We use the Free version of Rudderstack with Snowflake as the destination. This is breaking all of the downstream data models which are being used by our team on a daily basis. This seems to have affected all of the resources - I checked Organizations and Persons, and both of them have the same issue with their respective ID fields. I've also checked with a different sync service we have as a backup, and it's continuing to treat the IDs as numerical values as expected.
Just an update on this - I've discovered that it's not that the IDs have been replaced - it's that every time something in the deal changes (e.g. value gets changed, a custom field gets changed, or an email gets received), a new row is generated with a unique ID. We've currently 'resolved' this by: • Removing any joins to deal ID in downstream models • Used a window function filter for the largest deal
update_time
, partitioning by the deal
title
Both of these are extremely non-ideal, but have been done just to unblock our critical processes.
c
@calm-art-92597 Thank you for validating the issue. Yes, this severely affects my downstream processes. We use the ids all over the place and a window function will not help me identify the ids.
@calm-art-92597 For the deals table, there is both and id column and a __id column and the __id column would see "duplication" of the id value whereas now, it is NULL. Also, the foreign key reference to the organization_id looks like the id (displays as non-null bigint), but all new organizations in the last two days in the organization table display as the guid.
j
@shy-kite-21035
c
Hi RudderStack, We have good number of downstream dependencies associated with this hash (I called it a guid erroneously) being inserted for the ids associated with deals, organizations, ... We have told our user community that these dependent business applications are waiting for a fix with our integration software. It looks like an engineer will need to fix this in the source code. -Do you have an engineer assigned to this? -Do you have an eta? At some point, I need to come-up with a plan B for my downstream dependencies (they are all failing and staff are raising tickets). I can try a permutation of the windows function solution. I like a good problem. This might buy us some time. We came from Blendo and RudderStack has worked well for us, though we have not been a big volume customer. What is your plan? Thanks, Patrick
s
Hi @clever-memory-69987, sorry for the inconvenience caused to your customers • Yes the engineering team is working on releasing a hot-fix for this • This should be fixed by EOB today (8 Dec 2022)
c
@shy-kite-21035 Thank you for the update
@shy-kite-21035 I am watching the records and I will confirm as soon as I see the correction. Thank you!
@shy-kite-21035 I am still watching for new records include this fix. I have been closely watching my deal ids from pipedrive and I have not seen this corrected yet.
I am still watching for the id to change from a hash value to a bigint. I have checked every few hours in our enterprise rudderstack environment. @calm-art-92597 I appreciate your suggestion associated using a window function. Most of downstream applications and tools (et cetera) are highly dependent on the deal id. I also benefited from your insight (the deals table kind of acts like a deal history table now). Our people have wanted a deal history table (I have requirements for that), though we did not anticipate it in this way. I'll attach my "band-aid" view which I substitute for my old table (the result set will mimic the pre-12/5/2022 behavior). Maybe someone will benefit from looking at this (or spot an error of mine). The view is intended as a band-aid and the starting new deal id is specific to our instance of pipedrive.
Here is my "wall of code" associated with my ddl of a view I will use as a band-aid to mimic and use in place of the pipedrive deals table. We sent an en masse email to our user community indicating all our downstream apps and tools were not working, but now I resolved all the issue where a ticket was raised.
Copy code
ALTER VIEW pipedrive_deals_bandaid AS
  WITH new_pipedrive_deals_unique AS (
        SELECT MAX(update_time) update_time
             , add_time
             , org_id
          FROM pipedrive_deals
         WHERE 1               = 1
           AND update_time     >= DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
           AND add_time        >= DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
           AND TRY_CAST(id AS bigint) IS NULL
         GROUP BY org_id, add_time)
     , existing_pipedrive_deals_unique AS (
        SELECT MAX(pd1.update_time) max_update_time
             , MIN(pd2.update_time) min_update_time
             , pd1.add_time
             , pd1.org_id
          FROM pipedrive_deals pd1
          JOIN pipedrive_deals pd2
         ON pd1.org_id = pd2.org_id
        AND pd1.add_time = pd2.add_time
         WHERE 1               = 1
           AND pd1.update_time     >= DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
           AND pd2.update_time     < DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
           AND pd1.add_time        <  DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
           AND try_cast(pd1.id as bigint) is null
         GROUP BY pd1.org_id, pd1.add_time)
     , new_deals AS (
        SELECT id
          FROM pipedrive_deals pd
          JOIN new_pipedrive_deals_unique pdu
            ON pdu.org_id      = pd.org_id
           AND pdu.add_time    = pd.add_time
           AND pdu.update_time = pd.update_time) ,
   existing_deals AS (
        SELECT pd1.id
               , pd2.id deal_id
          FROM existing_pipedrive_deals_unique pdu
          JOIN pipedrive_deals pd1
            ON pdu.org_id      = pd1.org_id
           AND pdu.add_time    = pd1.add_time
           AND pdu.max_update_time = pd1.update_time
          JOIN pipedrive_deals pd2
            ON pdu.org_id      = pd2.org_id
           AND pdu.add_time    = pd2.add_time
           AND pdu.min_update_time = pd2.update_time
       )
SELECT pd.update_time
     , pd.context_sources_task_id
     , pd.lead_source
     , pd.last_incoming_mail_time
     , pd.next_activity_id
     , pd.next_activity_duration
     , pd.close_time
     , pd.notes_count
     , pd.owner_name
     , pd.renewal_type
     , pd.products_count
     , pd.email_messages_count
     , pd.last_outgoing_mail_time
     , pd._8725949665_ae_915_f_9_eff_865_a_60347492_f_76_a_67_c_0
     , pd.original_timestamp
     , pd._value
     , CAST(24784 + ROW_NUMBER () OVER ( ORDER BY pd.add_time) AS NVARCHAR(256))  id
     , pd.org_hidden
     , pd.currency
     , pd.on_contact_opportunity_id
     , pd.last_activity_id
     , pd.person_name
     , pd.won_time
     , pd.stage_id
     , pd.weighted_value_currency
     , pd.formatted_value
     , pd.next_activity_subject
     , pd.rotten_time
     , pd.deleted
     , pd.participants_count
     , pd.title
     , CAST(24784 + ROW_NUMBER () OVER ( ORDER BY pd.add_time) AS NVARCHAR(256))  __id
  FROM new_deals nd
  JOIN pipedrive_deals pd
    ON nd.id           = pd.id

UNION ALL

SELECT pd.update_time
     , pd.context_sources_task_id
     , pd.lead_source
     , pd.last_incoming_mail_time
     , pd.next_activity_id
     , pd.next_activity_duration
     , pd.close_time
     , pd.notes_count
     , pd.owner_name
     , pd.renewal_type
     , pd.products_count
     , pd.email_messages_count
     , pd.last_outgoing_mail_time
     , pd._8725949665_ae_915_f_9_eff_865_a_60347492_f_76_a_67_c_0
     , pd.original_timestamp
     , pd._value
     , ed.deal_id id
     , pd.org_hidden
     , pd.currency
     , pd.on_contact_opportunity_id
     , pd.last_activity_id
     , pd.person_name
     , pd.won_time
     , pd.stage_id
     , pd.weighted_value_currency
     , pd.formatted_value
     , pd.next_activity_subject
     , pd.rotten_time
     , pd.deleted
     , pd.participants_count
     , pd.title
     , ed.deal_id __id
  FROM existing_deals ed
  JOIN pipedrive_deals pd
    ON ed.id           = pd.id

UNION ALL


SELECT pd.update_time
     , pd.context_sources_task_id
     , pd.lead_source
     , pd.last_incoming_mail_time
     , pd.next_activity_id
     , pd.next_activity_duration
     , pd.close_time
     , pd.notes_count
     , pd.owner_name
     , pd.renewal_type
     , pd.products_count
     , pd.email_messages_count
     , pd.last_outgoing_mail_time
     , pd._8725949665_ae_915_f_9_eff_865_a_60347492_f_76_a_67_c_0
     , pd.original_timestamp
     , pd._value
     , pd.id
     , pd.org_hidden
     , pd.currency
     , pd.on_contact_opportunity_id
     , pd.last_activity_id
     , pd.person_name
     , pd.won_time
     , pd.stage_id
     , pd.weighted_value_currency
     , pd.formatted_value
     , pd.next_activity_subject
     , pd.rotten_time
     , pd.deleted
     , pd.participants_count
     , pd.title
     , pd.__id
  FROM pipedrive_deals pd
  WHERE 1=1
   AND update_time     < DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
   AND add_time        < DATETIMEFROMPARTS(2022, 12, 5, 14, 36, 51, 0)
    ;
c
@shy-kite-21035 I've just checked and the data has not corrected itself. I'm wondering if we might potentially need to delete and re-setup the integration? I imagine that Rudderstack might not have a way to delete the rows that were errornously added. @clever-memory-69987 I'm fortunate in that a good number of our operations are winding down this time of year, and the key time-critical operations didn't need the joins to deal ID. I'm hoping the issue gets resolved soon and that I won't need to further bandaid in the way that you've attempted. Side note for the deal history thing - we've been using dbt for our data transformation, and it has a snapshots function that has been working well for us.
j
Hi @calm-art-92597 and @clever-memory-69987, it looks like the team has released the patch to fix this issue and the team will be executing the data update scripts this weekend to customers.
c
@jolly-toddler-15438 Thank you for the update. @calm-art-92597 and @bright-dream-295 have questioned whether they need to delete and re-set-up their integration (or just the destination). Is this needed? I too have wondered when you release a change to which key-value pairs you are including in your destination tables, do we need to re-establish a new destination to capture the change?
j
For this issue, I don’t believe you need to do the set up again. cc @shy-kite-21035
👀 1
👍 2
c
I've just checked and the problem still seems to be there
👀 1
b
@calm-art-92597 same here. It looks like the new records are OK, but there was no fix for past events
c
@calm-art-92597 @bright-dream-295 @melodic-vegetable-65327
My deal id's are now showing as integers and not as a hash. I am looking over/reviewing the records as well as the other tables (because the id showing up as a hash was systemic).
Thank you for fixing this. I am still reviewing results.
✅ 1