AttributeError: 'DSSDataset' object has no attribute 'write_with_schema'
vaishnavi
Registered Posts: 40 ✭✭✭✭
I am trying to connect to Dataiku DSS instance using "dataikuapi" python library outside DSS. I am able to connect to the client, get the project and get the dataset. But unable to write to the dataset using "write_with_schema" or "write_from_dataframe" options.
Below is my piece of code:
Below is my piece of code:
cellid_dataiku = project.get_dataset("cellid")
print(type(cellid_dataiku))
cellid_dataiku.write_with_schema(df)
Getting the below error :-
AttributeError: 'DSSDataset' object has no attribute 'write_with_schema'
AttributeError: 'DSSDataset' object has no attribute 'write_with_schema'
Answers
-
Hi @vaishnavi
,You are unable to use write_with_schema() because this function is available on dataiku.Dataset class.When you are using "dataikuapi" python library outside DSS you should use DSSDataset class. This does not contain the function write_with_schema().