get_settings() does not exist on DSSDataset

Solved!
nio
Level 1
get_settings() does not exist on DSSDataset

Hello,

I'm trying to get the settings of a dataset.

(https://doc.dataiku.com/dss/latest/python-api/datasets-reference.html#dataikuapi.dss.dataset.DSSData...)

In the example, the DSSDataset object yields a DSSDatasetSettings, which can be used for various reasons as I'm going to use it for schema_columns. However, on my environment, the get_settings() call gives the following error:

external_client = dataikuapi.DSSClient(host, api_key)

external_client.get_project("PROJ_1").get_dataset("df_1").get_settings()
AttributeError: 'DSSDataset' object has no attribute 'get_settings'

This is quite strange, because the type of the object is exactly as the same as the example.

print(type(external_client.get_project("PROJ_1").get_dataset("df_1")))
<class 'dataikuapi.dss.dataset.DSSDataset'>

Can you explain why there can be a difference, and how can I get the dataset settings or the dataset schema?

Thanks!

 

 

0 Kudos
1 Solution
Nicolas_Servel
Dataiker
Dataiker

Hello, which version of DSS are you using ?

the "get_settings" method has been added in DSS 8.0.

Prior to that, there was a "get_definition" method, that returned the settings as a simple dictionary, which is less powerful than the new "get_settings" that returns an actual object. The "get_definition" has been deprecated starting DSS 8.0.

Hope this helps,

Best regards

View solution in original post

0 Kudos
2 Replies
Nicolas_Servel
Dataiker
Dataiker

Hello, which version of DSS are you using ?

the "get_settings" method has been added in DSS 8.0.

Prior to that, there was a "get_definition" method, that returned the settings as a simple dictionary, which is less powerful than the new "get_settings" that returns an actual object. The "get_definition" has been deprecated starting DSS 8.0.

Hope this helps,

Best regards

View solution in original post

0 Kudos
nio
Level 1
Author

Yes, the version is 7.0.2, so it explains the reason I could not see "get_settings" method.

Thanks for the other solution. It helped a lot!

0 Kudos
A banner prompting to get Dataiku DSS
Public