Problem when using new_managed_dataset_creation_helper()
esteban23
Registered Posts: 4 ✭✭✭✭
Hi! I'm trying to create a dataset from a notebook using the method "new_managed_dataset_creation_helper()". E.g.:
dataset = builder.create()
Then, when running:
UnicodeDecodeErrorTraceback (most recent call last) <ipython-input-23-cd2bbeff86b9> in <module>() ----> 1 dataset = builder.create() /home/s-dataiku/Dataiku_install/dataiku-dss-8.0.4/python/dataikuapi/dss/dataset.pyc in create(self, overwrite) 829 body = { 830 "name": self.dataset_name, --> 831 "creationSettings": self.creation_settings 832 }) 833 return DSSDataset(self.project.client, self.project.project_key, self.dataset_name) /home/s-dataiku/Dataiku_install/dataiku-dss-8.0.4/python/dataikuapi/dssclient.pyc in _perform_json(self, method, path, params, body, files, raw_body) 1011 1012 def _perform_json(self, method, path, params=None, body=None,files=None, raw_body=None): -> 1013 return self._perform_http(method, path, params=params, body=body, files=files, stream=False, raw_body=raw_body).json() 1014 1015 def _perform_raw(self, method, path, params=None, body=None,files=None, raw_body=None): /home/s-dataiku/Dataiku_install/dataiku-dss-8.0.4/python/dataikuapi/dssclient.pyc in _perform_http(self, method, path, params, body, stream, files, raw_body) 991 try: 992 http_res = self._session.request( --> 993 method, "%s/dip/publicapi%s" % (self.host, path), 994 params=params, data=body, 995 files = files, UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)
The following error is printed:
import dataiku client = dataiku.api_client() project = client.get_project('myprojectname') builder = project.new_managed_dataset_creation_helper("mydatasetname") builder.with_store_into("myhdfsconnection", format_option_id="myformat")
I use the same parameters (for the string parameters 'myhdfsconnection' and 'myformat') that I choose when I create a dataset from the Inputs/Outputs Recipe menu.
Thanks!
Best Answer
-
Hi! I already solved it. I thought that in "myprojectname" one should input the project name as shown in the UI. Instead, one must input the uppercase name that appears in the URL.
Answers
-
CoreyS Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 1,150 ✭✭✭✭✭✭✭✭✭
Hi @esteban23
! Thank you for sharing your solution.