CData Python Connector for DataRobot

Build 21.0.7930

Connecting to and Using DataRobot

Connecting to DataRobot

To establish a connection to DataRobot, you will need to use the Login method.

To connect using the Login method, the following connection properties are required: User, Password, and PredictionInstance. DataRobotKey may also be required depending on your type of DataRobot predictions instance. ApiURL might also need to be set if connecting to an on-premise instance of DataRobot. If using the Predictions API, DataFile is required. It is expected that the CSV DataFile will include a header row as the first row of the datafile. DataFileEncoding should be used to specify the encoding of your DataFile if it is not UTF-8 encoded. APIKey is not required, but can be supplied. If not supplied, the driver will handle obtaining an APIKey.

User, Password, DataRobotKey, and APIKey are the credentials for the account to which you wish to connect the provider.

ProjectID, DataFile, and ModelId are the parameters for the project, dataset, and model that you would like to connect to. ProjectID and ModelId do not need to be specified. However, not specifying these connection properties will limit the tables and views exposed by the driver.

Using DataRobot

The driver supports executing SELECT queries against all of the DataRobot entities exposed in its data model.

Queries to Models and Projects will return information on one or many models or projects, depending on the WHERE clause used in your SELECT query. See the example queries below:

SELECT * FROM Projects WHERE Id = 'abcdefghi'

SELECT * FROM Models WHERE projectId = 'abcdefghi' AND Id = '123456789'

SELECT * FROM readmitted_Predictions

Queries to Predictions will submit the data in the file specified for DataFile to the DataRobot Prediction API for predictions scoring. When the predictions are returned from the Prediction API, the driver will join the predictions and corresponding data from DataFile into one table. Note that for the Predictions table to be exposed, both the ProjectID and ModelId connection properties must be specified.

SELECT race, gender, age, [predictionValues.0.value], [predictionValues.1.value] FROM Predictions WHERE ModelId = '123456789' AND ProjectId='abcdefghi'

Deployments will be dynamically exposed as tables. Similarly, starred models will be dynamically exposed if the ExposeStarredModels connection property is set and a ProjectID is specified. Queries to dynamically exposed deployments or starred models will return information on predictions using the project and model associated with that Deployment.

SELECT race, gender, age, [predictionValues.0.value], [predictionValues.1.value] FROM readmitted_Predictions

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930