Solved

How to fix events logged in wrong environment?

  • 6 December 2022
  • 2 replies
  • 149 views

Due to a bug in the loading of the ampli wrapper (on my side), all of the events for an ampli project were being logged into our development environment for about 3 weeks (small project with only a couple of events).

 

As these events are not database-driven, I can’t backfill them by making a bunch of events again from data in our database.

 

Is there any sort of recourse I can do for recovering these events from the wrong environment?

icon

Best answer by Saish Redkar 6 December 2022, 16:31

View original

2 replies

Userlevel 7
Badge +10

Hey @scottjohnson 

Are you looking to reingest these mistagged events which went into your dev environment into your correct prod project?

I’m understanding that you don’t own a copy of these events outside of Amplitude, right?

One approach could be to first export these events from the dev environment using Export API or to a preferred warehouse destination. This would ensure you have the events from dev copied to zipped json files and/or to the warehouse database.

You can then transform/clean these events and selectively ingest them in your correct prod environment using Batch API. You can refer to the backfill guide in here.
 

Hope this helps.

Userlevel 6
Badge +8

Hi @scottjohnson ,

 

I would agree wholeheartedly with @Saish Redkar ! The best option would be to use the Export API and then import the events again into the correct environment. 

 

Kind Regards,
Denis

Reply