Reading Datasets using names stored in another dataset
Hi I have a project 'test' which has 6 datasets. student_name & s_1.s_2,s_3..s_5.
student_name dataset has 2 columns: name & content.
content column shows the name of datasets pertaining to each student (s_1 etc).
I am creating a dashboard where each student will have a tab to show the contents of the related s_n dataset.
#So my code is like tabs = []
for _,row in student_name.iterrows():
name = row['name']
content = row['content']
ds = dataiku.Dataset(content)
df = ds.get_dataframe() tab_display = df.head()
However, i am getting error that dataset 'test.s_1' not found. Seems dataiku is appending project name when looking for datasets.
How can i avoid having project name appended when calling for datasets using dataiku.Dataset.
Thanks
Operating system used: Windows
Operating system used: Windows
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,161 Neuron
The error doesn't mean that Dataiku is appending the project key, it means Dataiku could couldn't find the dataset in the project. Dataset names are case sensitive so make sure you have the correct dataset name without spaces and strange characters. Also dataiku.Dataset() takes the dataset name not the dataset ID which depending the version of Dataiku can be different if you rename a dataset.