You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1204 added the ability to delay the transaction within a populate call until needed, but did not provide instructions/documentation on proper use of this feature.
Does it require two yields? Before and after the inserts, but what should I yield to preserve referential integrity?
Ah, ok. Thanks, @dimitri-yatsenko. I was under the impression that this feature was available in 0.14.4, but I'm hitting the bug that #1241 fixed in my CICD. It looks like I'll have to wait for the next release to put this in practice
Appropriate syntax for anyone on pre-release...
@schemaclassMyTable(dj.Computed):
...
classMyPart(dj.Part):
...
defmake_fetch(self, key):
some_data=Upstream().fetch_relevant(key)
return [some_data] # I hit an error if a single item was not passed as a listdefmake_compute(self, key, some_data):
some_insert_1=self.computation1(some_data)
some_insert_2=self.computation2(some_data)
returnsome_insert_1, some_insert_2defmake_insert(self, key, some_insert_1, some_insert_2):
self.insert1(some_insert_1)
self.MyPart.insert1(some_insert_2)
Yes, @CBroz1, and thank you. I missed one merge before making release 0.14.4, so only the generative version made it into the release. We are preparing a new release, including the documentation shortly. 0.14.5
Activity
dimitri-yatsenko commentedon Jun 19, 2025
This was improved in #1241.
CBroz1 commentedon Jun 20, 2025
Ah, ok. Thanks, @dimitri-yatsenko. I was under the impression that this feature was available in
0.14.4, but I'm hitting the bug that #1241 fixed in my CICD. It looks like I'll have to wait for the next release to put this in practiceAppropriate syntax for anyone on pre-release...
dimitri-yatsenko commentedon Jun 20, 2025
Yes, @CBroz1, and thank you. I missed one merge before making release 0.14.4, so only the generative version made it into the release. We are preparing a new release, including the documentation shortly. 0.14.5
fix datajoint#1246, updated docs to explain three-part make pattern