Bulk update of parent ID (Python API)
I'm building a project schedule that represents an overall manufacturing production plan. The the resulting Smartsheet has roughly 7,000 rows. I've found a way to use bulk API calls for all but setting the parent IDs, which is now taking upwards of 20 minutes.
Here's the basic flow:
-- Create production schedule in memory
-- Export to CSV
-- Import CSV to a new sheet (Sheet A)
-- Replicate a template Gantt sheet into a new sheet (Sheet B)
-- Copy all Imported rows from Sheet A to Sheet B (the Gantt) because importing CSV to the Gantt wasn't working. Might be able to condense these two steps. But, that's not my issue.
-- My issue is this. I now have to run repeated update_rows() requests, once for each parent ID. This was necessary because update_rows() doesn't allow updates to different parent IDs in the same call. Grouping by parent ID let me reduce the number of calls substantially, but I'm still hitting the rate limit.
Is there a way to a) include the parent ID in the CSV import, or b) somehow import a bulk update to parent IDs?
Answers
-
Hi @jscottcarr
If I'm understanding you correctly, you're looking to create hierarchy by updating rows via the API. In this instance you're correct - you'll need to do one call per Parent row.
Here's a discussion in StackOverflow that may help: Building whole sheet programmatically with Python SDK
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
How can we get the multiple parentID update into the product backlog? The error message ID 1123 hints that it will one day be supported...
"Specifying multiple row locations is not yet supported. Each row must use the same row location attribute and value (toBottom, toTop, parentId, siblingId, above)."
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives