Unanswered
Hi All,
I'Ve Been Experimenting Around With Automating The Data Sync. This Is Related To This Thread:
Hi @<1545216070686609408:profile|EnthusiasticCow4> ! I have an idea.
The flow would be like this: you create a dataset, the parent of that dataset would be the previously created dataset. The version will auto-bump. Then, you sync this dataset with the folder. Note that sync will return the number of added/modified/removed files. If all of these are 0, then you use Dataset.delete
on this dataset and break/continue, else you upload and finalize the dataset.
Something like:
parent = Dataset.get(dataset_name="[LTV] Dataset")
dataset = Dataset.create(..., parents=[parent.id])
synced = dataset.sync_folder(local_path=folder)
if not any(synced):
Dataset.delete(dataset.id)
return
dataset.connect/add_tags/upload()
dataset.finalize()
165 Views
0
Answers
one year ago
one year ago