Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
I am creating a flow where a User will upload csv files everytime they use my flow. I want to dynamically store this filename in a variable and use in my python code. How can I store the filename dynamically in a variable ?
Operating system used: Windows
Hi,
if "upload" in this context means "upload in a UploadedFiles dataset", then you can get the names of the files in such a dataset with a few lines of python
import dataiku
ds = dataiku.Dataset('the_name_of_the_dataset')
file_paths = [p['path'] for p in ds.get_files_info()['globalPaths']]
and file_paths will be the '/'-prefixed list of names of files in the dataset