Get the pattern of a partitioned managed folder

Moon11
Moon11 Registered Posts: 2
edited July 16 in Using Dataiku

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

Tagged:

Answers

  • Zach
    Zach Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 153 Dataiker
    edited July 17

    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
    Moon11 Registered Posts: 2

    Thx it was exactly what I was looking for !

Setup Info
    Tags
      Help me…