Tilt Posted December 8, 2016 Report Share Posted December 8, 2016 Hi, is there a way to get all the custom_attributes in a query or a session.populate() call? I can do session.query("select custom_attributes from Shot where ....") but when I check the values with "auto_populating False", they are mostly Symbol(NOT_SET), except for default values. I can't do "select custom_attributes.fstart from Shot where ..." because that throws ftrack_api.exception.ServerError: Server reported error: KeyError(u'fstart') as does session.populate(shot, "custom_attributes.fstart") The reason I'm asking is that I usually need a bunch of custom attributes so I want to speed things up and reduce queries. Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted December 9, 2016 Report Share Posted December 9, 2016 I think you can get rid of some extra queries by selecting value: 15 hours ago, Tilt said: session.query("select custom_attributes.value from Shot where ....") I'm working on a fix for this right now that will speedup custom attributes so that your query above will fetch all necessary data in one go. This is a larger change in our backend and api so there will be some time before it is properly tested and released. But just so you know; we are aware of this and working on it. Link to comment Share on other sites More sharing options...
Tilt Posted December 9, 2016 Author Report Share Posted December 9, 2016 Thank you! Link to comment Share on other sites More sharing options...
Remus Avram Posted April 20, 2017 Report Share Posted April 20, 2017 Hi Mattias! Are there any updates regarding this feature? What I want is to get only the custom attributes value of a ftrack entity. shot_custom_attributes = session.query("select custom_attributes from Shot where ....") Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted April 20, 2017 Report Share Posted April 20, 2017 Hi Remus, Just so that I understand - is this about fetching just a single custom attribute (for performance reasons) rather than all? Link to comment Share on other sites More sharing options...
Remus Avram Posted April 20, 2017 Report Share Posted April 20, 2017 Not really. It would be cool if we could fetching only the custom attributes of an ftrack entity instead of all the data (children, parent, etc) Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted April 21, 2017 Report Share Posted April 21, 2017 I see, there are some substantial changes in 3.5.0 to custom attributes - hopefully the issue will be resolved then. I've contacted you in support-case #30782 about this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.