Clear Azure Managed Folder with Python Client
How to perform the action form UI:
With Python Client API?
https://github.com/dataiku/dataiku-api-client-python/blob/master/dataikuapi/dss/managedfolder.py
#IndentifiedWaitingInBacklog?
Cheers,
- Saul
Best Answer
-
Miguel Angel Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 118 Dataiker
Hi Saul,
You can use the 'clear' managed folder method: https://developer.dataiku.com/latest/api-reference/python/managed-folders.html#dataiku.Folder.clear
For example in a notebook:
import dataiku myfolder = dataiku.Folder("<managed folder id>") myfolder.clear()
Answers
-
I still confused with APIs, sometimes is dataiku.core, other times dataikuapi...
Is it possible to perform clear using python dataikuapi?
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,993 Neuron
This is a bit confusing indeed but there are actually two Python APIs:
import dataiku: Use when running inside Dataiku (ie in a DSS Recipe or Jupyter Notebook)
import dataikuapi: Use when running outside Dataiku (ie from a Python shell or from another Python runtime environment like your local PC).
The outside API is a REST base API so it can also be used from any other language or program that supports REST APIs including manually using Python requests.
The two APIs should have equivalent functionality but there can be differences sometimes. To add more confusion the dataikuapi package name is dataiku-api-client. Always use the Inside API if you can as it will be faster.
https://developer.dataiku.com/latest/getting-started/dataiku-python-apis/index.html
https://developer.dataiku.com/latest/concepts-and-examples/client.html
-
I would like a more user friendly API, current APIs (Core and Client) are dissimilar and they doesn't share the same functionality, so we as end users have spend time searching how to achieve the same functionalities, takes this example:
Method clear, for Folders is only available on Core API, and for Dataset is only on Client API. That doesn't make any sense!The lesson learned here is take a look in both APIs, functionality you are looking for must be in one of the two.
Good Luck Dataikers!
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,993 Neuron
@saulleon
wrote:I would like a more user friendly API, current APIs (Core and Client) are dissimilar and they doesn't share the same functionality, so we as end users have spend time searching how to achieve the same functionalities, takes this example:
Method clear, for Folders is only available on Core API, and for Dataset is only on Client API. That doesn't make any sense!The lesson learned here is take a look in both APIs, functionality you are looking for must be in one of the two.
Good Luck Dataikers!
Hi, this is a great suggestion, please post it on the Product Ideas section of the community: https://community.dataiku.com/t5/Product-Ideas/idb-p/Product_Ideas
-
Posted, I hope API in the future will be more coder friendly
Cheers!
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,993 Neuron
I don't see the idea to vote for it. Can you please post the link? Thanks