Return named tuples or objects instead of raw JSON responses
cmenguy opened this issue · comments
Currently when calling most of the functions it just returns a raw JSON response, and you have to manually inspect it to retrieve what you need. It would be nice to instead return a specific object that you can directly extract known fields from.
For example when creating a dataset, to get the dataset ID you need to do something like dataset_response[0].split("/")[-1]
but we would like to change it so that we can just do dataset_response.dataset_id
Another example in catalog
module to get the table name for a dataset we have to do response[dataset_id]["tags"]["adobe/pqs/table"][0]
but it would be so much easier to use response.table_name
FYI: This should be doable but I do not see this as a blocker and nothing you could not accomplish yourself from the response. So I park it for now.