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
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives