Check out the first Dataiku 8 Deep Dive focusing on Productivity on October 29th Read More

how to retrieve list of all datasets of flow with R

Level 2
how to retrieve list of all datasets of flow with R

I have built shiny web app with R, it works fine with manully preset dataset, but I would like to add an ability for user to choose a dataset from flow. So what I would like to do is to retrieve a list of all datasets in flow and then let the user to choose which dataset to upload into app. 

0 Kudos
1 Reply
Level 2
Author

Since I have not found a straight forward solution I come up with one.

So since I wanted to get all the dataset names as list I used dkuManagedFolderPartitionPaths which retrieves all dataset paths from managed folder. The paths look something like this "\dataset_name\.csv.gz". since paths are saved as a list all I had to do was to extract substring between first two "\" and then save it as list. 

paths <- dkuManagedFolderPartitionPaths(name)
res <- str_match(paths, "/\\s*(.*?)\\s*/")
data_list = as.list(res[,2])

0 Kudos
Labels (4)