Clear Azure Managed Folder with Python Client

Solved!
saulleon
Level 3
Clear Azure Managed Folder with Python Client

How to perform the action form UI:

folder.png

With Python Client API?

https://github.com/dataiku/dataiku-api-client-python/blob/master/dataikuapi/dss/managedfolder.py 

#IndentifiedWaitingInBacklog?

Cheers,

- Saul

0 Kudos
1 Solution
MiguelangelC
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()

 

 

View solution in original post

0 Kudos
7 Replies
MiguelangelC
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()

 

 

0 Kudos
saulleon
Level 3
Author

I still confused with APIs, sometimes is dataiku.core, other times dataikuapi...

folder.png

Is it possible to perform clear using python dataikuapi?


0 Kudos
Turribeach

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

 

0 Kudos
saulleon
Level 3
Author

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:

folder.png

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!

0 Kudos
Turribeach

@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:

folder.png

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

 

0 Kudos
saulleon
Level 3
Author

Posted, I hope API in the future will be more coder friendly

Cheers!

 

0 Kudos
Turribeach

I don't see the idea to vote for it. Can you please post the link? Thanks

0 Kudos