Submit your innovative use case or inspiring success story to the 2023 Dataiku Frontrunner Awards! LET'S GO

Get the pattern of a partitioned managed folder

Moon11
Level 1
Get the pattern of a partitioned managed folder

Hello,

I'm working with partitoned managed folders and i would like to get the pattern of the partionning (available in the web interface ; see screenshot)

Capture d’écran 2022-11-09 à 16.20.48.png
For Datasets, I can get such informations with

dst = dataiku.Dataset(dataset_name)
dst.get_config()["partitioning"]["filePathPattern"]

But I cant find the equivalent for managed folder.


Operating system used: Macos

0 Kudos
2 Replies
ZachM
Dataiker

Hi @Moon11,

You can get the partitioning pattern of a managed folder by using the API client:

import dataiku

client = dataiku.api_client()
project = client.get_default_project()
# Set this to the ID of your folder
folder = project.get_managed_folder("d2FXUqyf")

folder.get_definition()["partitioning"]["filePathPattern"]

 

Thanks,

Zach

Moon11
Level 1
Author

Thx it was exactly what I was looking for !

0 Kudos