# PSC bulk "generated\_at" timestamp

**URL:** <http://forum.companieshouse.gov.uk/t/psc-bulk-generated-at-timestamp/5231>\
**Category:** API Question\
**Created:** [July 6, 2022, 12:26pm UTC](http://forum.companieshouse.gov.uk/t/psc-bulk-generated-at-timestamp/5231 "2022-07-06T12:26:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jburant](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jburant](http://forum.companieshouse.gov.uk/u/jburant)\
**Post date:** [July 6, 2022, 12:26pm UTC](http://forum.companieshouse.gov.uk/t/psc-bulk-generated-at-timestamp/5231/1 "2022-07-06T12:26:47Z")

</div>

I would like to make a seamless integration of data from the PSC bulk file and the PSC streaming API.

The only timestamp information on the PSC bulk file comes in the last line. For example, for the file available a few days ago this was (note I have adjusted formatting slightly for reading clarity):

{“data”:  
{  
“kind”: “totals#persons-of-significant-control- snapshot”,  
“persons\_of\_significant\_control\_count”: 9810297,  
“statements\_count”: 628256,  
“exemptions\_count”: 61,  
“generated\_at”: “2022-07-03T03:41:30+01:00”  
}  
}

My question is: Can I rely on generated\_at for comparison with the event.published\_at data element from the streaming API? More specifically, is it guaranteed that the bulk file accounts for all changes/deletions made up to the generated\_at moment and nothing else, so that if I begin with API timepoints with event.published\_at immediately after that timestamp that I will have a seamless integration with no data loss?

I realize there may be timezone issue based on the formatting of the timestamps, but I should be able to figure that out.

Thanks

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [July 8, 2022, 2:21pm UTC](http://forum.companieshouse.gov.uk/t/psc-bulk-generated-at-timestamp/5231/2 "2022-07-08T14:21:03Z")

</div>

The “generated\_at”: “2022-07-03T03:41:30+01:00” is the end time of the dump process. It is configured to start at 03:30hrs (Although it is sometimes produced at different times of the day) and generally takes approx 10-15 mins.  
The data source is not ‘locked’ so there is a chance that updates could be applied during this 10-15 min window.  
Hope that helps.

---

<div class="post-metadata">

**Author:** ![jburant](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jburant](http://forum.companieshouse.gov.uk/u/jburant)\
**Post date:** [July 8, 2022, 3:46pm UTC](http://forum.companieshouse.gov.uk/t/psc-bulk-generated-at-timestamp/5231/3 "2022-07-08T15:46:16Z")

</div>

Thanks. Instead of trying for an exact match on timing, I started with a bulk file and took the streaming API timepoints starting the prior day and just walked through them sequentially matching with the bulk file on links.self updating by overwriting bulk file data when a change event was specified and deleting where a delete event was specified. Any reason that wouldn’t be a reasonable approach?
