Q & A
Governance & Security
Learn Dataiku DSS
Q & A
Ask a Question
Email or Username
I forgot my password
How to lock a given dataset?
We can access a given dataset using the DSS REST API, but we would like this dataset not to be written on while it is accessed.
1) Is it possible to check whether a dataset is currently modified using the api?
2) Is it possible to lock data writing on a dataset using the api?
If it's not possible to do this using the api, what would be the most suitable alternative (with a scenario)?
to add a comment.
to answer this question.
Locking a dataset is not currently possible through the API. Could you please tell us more about the scenario you would like to build?
If all actions can be defined as scenario steps (no API calls external to the scenario), there should not be lock issues since steps are synchronous by default.
ask related question
Thanks Alexandre! The idea here is to prevent another application (external to DSS) to read a data file on the DSS server while the dataset corresponding to this file is being built by DSS.
Our initial assumption was to use the API to tell DSS not to build the dataset until the application is done reading it or to tell the application not to read the file while the dataset is being built. I had two ideas to go around this concurrency issue without direct API call :
1) The dumb solution : have the scenario building that dataset writing a line to another "lock" dataset at the beginning of the build and deleting it at the end of the build : the data file is accessible to the application only when the "lock" dataset is empty.
2) The neckbeard solution : creating system-wide lock files (
I was going for the second one, but other options are welcome!
In my opinion, (1) should be simple and straightforward.
Slight modification of 1: If you have access to advanced automation features, you could implement it as a Python scenario step, which executes your own code to tell the external application that the dataset is ready. This way why no dummy dataset is needed :)
Thanks a lot! I'm going to give it a try!
to add a comment.
Most popular tags
How to rebuild a “SQL query” dataset ?
How to resize a column in dataset
How to load a large HTTP dataset in DSS ?
How to perform analysis in a python notebook on a part of a dataset without loading all the dataset in memory
How to transpose a dataset?
Welcome to Dataiku Answers, where you can ask questions and receive answers from other members of the community.
©Dataiku 2012-2018 -