Best way to pull all rows in a table

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
jeremy60601
User
Posts: 4
Joined: Wed Jul 07, 2021 9:34 am

Best way to pull all rows in a table

Post by jeremy60601 »

In general terms, what is the best way to pull all rows (and selected columns) from an entity - say, the Candidates table. And what if I need to apply a filter, such as all records after a certain dateAdded?

Based on this reference (https://bullhorn.github.io/rest-api-docs/), I'm not sure if I should use /query or /search.

I wrote Python code that uses /search (https://bullhorn.github.io/rest-api-docs/#get-search), with a query of "'dateAdded:[* TO *]" It pulls the data in chunks of 500 by augmenting the 'start' parameter with each call. The problem is that the calls get progressively slower - they start out taking about one second, but slow down to 15 or 20 seconds as I reach 500,000 rows. I have several million to pull. Is there a better approach?
pmularski
Bullhorn Support Staff
Posts: 942
Joined: Wed Dec 31, 1969 8:00 pm

Re: Best way to pull all rows in a table

Post by pmularski »

Greetings Jeremy,

There are set limitations on the APIs, which you have already discovered, and it is not designed to pull an entire database. If you are looking to pull hundreds of thousands of records, you would be better off requesting a backup. That will provide you with the vast majority of the data associated with the database, including all of the individual records.
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131
jeremy60601
User
Posts: 4
Joined: Wed Jul 07, 2021 9:34 am

Re: Best way to pull all rows in a table

Post by jeremy60601 »

Thanks for the info!
Post Reply