Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I have a requirement to use Dataiku Python APIs outside of DSS and so following the instructions given in below article on how to use the APIs outside of DSS : Using the APIs outside of DSS - Dataiku Developer Guide
In the first step itself, when I try to install 'dataiku-internal-client.tar.gz' file, I am getting the below error:
ERROR: Could not find a version that satisfies the requirement requests>=2 (from dataiku-internal-client==11.4.1) (from versions: none)
ERROR: No matching distribution found for requests>=2 (from dataiku-internal-client==11.4.1)
My python version is 3.8.14 and I am not sure what is the issue here. Any help would be great.
Operating system used: Linux
That's interesting. I have never seen the suggestion of installing the outside API client from DSS itself but seems like a misguided suggestion. The error you get is precisely because of that. Furthermore the steps given are for the outside API but the file seems to be named "dataiku-internal-client.tar.gz" which seems to suggest is the internal client not the outside one. Adding to that the import is for connecting inside DSS ("import dataiku") not from outside. I may be wrong but maybe Dataiku has now integrated the two packages into one?
In any case I tend to prefer the old way of doing things which was more clear whether you were calling the Dataiku APIs from inside DSS or from outside.
So to use the Dataiku Python API from inside DSS to the same instance you do this inside a Python Recipe or Jupyter Notebook in DSS:
internal_client = dataiku.api_client()
Note there is nothing to install as it's already built-in and there is no need to specify a DSS URL or API, it will use the authentication of the user running the Recipe/Notebook.
To use the Dataiku Python API from outside DSS first you need to install the API package:
pip install dataiku-api-client
This package and all the relevant requirements will come from the official Python Package Index unless you customise the index you use with pip. Then you use it like this:
dataiku_url = 'https://dssurl/'
dataiku_api_key = 'api key'
external_client = dataikuapi.DSSClient(dataiku_url, dataiku_api_key)
# If you need to disable SSL checks use this line
# external_client._session.verify = False
From then on you have an API client handle and you can do pretty much the same things on both APIs with little exceptions. You can start with a simple API call like:
project_key_list = external_client.list_project_keys()
for project_key in project_key_list:
I believe these steps are much better since you don't depent on any DSS server to get the package and you will not get errors if you don't meet other dependencies. Also it's clear when you import the package which way you are going from inside or from outside.