Package com.datarobot
Interface IDatasetClient
-
- All Known Implementing Classes:
DatasetClient
public interface IDatasetClientTheIDatasetClientinterface provides access toDatasetrelated endpoints in the AI API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(java.lang.String datasetId)Delete a datasetDatasetget(java.lang.String datasetId)Retrieve a datasetAction<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse>getHttpMessageTransformer()DatasetimportFile(java.lang.String sourceFile)Upload a new dataset.DatasetimportUrl(java.lang.String url)Import a dataset from a url.DatasetListlist()Retrieve a list of uploaded datasets associated with this accountDatasetListlist(PagingParams params)Retrieve a list of uploaded datasets associated with this accountDatasetListlist(java.lang.String aiId)Retrieve a list of uploaded datasets associated with this AIvoidsetHttpMessageTransformer(Action<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse> httpMessageTransformer)java.util.concurrent.Future<Dataset>startImportFile(java.lang.String sourceFile)Start the process of uploading a dataset from a local file.java.util.concurrent.Future<Dataset>startimportUrl(java.lang.String url)Start the process of uploading a dataset from a url.
-
-
-
Method Detail
-
getHttpMessageTransformer
Action<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse> getHttpMessageTransformer()
-
setHttpMessageTransformer
void setHttpMessageTransformer(Action<com.google.api.client.http.HttpRequest,com.google.api.client.http.HttpResponse> httpMessageTransformer)
-
importFile
Dataset importFile(java.lang.String sourceFile) throws ClientException, java.io.FileNotFoundException, java.lang.InterruptedException
Upload a new dataset. See the Dataset page in the documentation for size limitations.- Parameters:
sourceFile- The path of the local file to upload- Returns:
- The new
Dataset - Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.java.io.FileNotFoundException- when a file with the specified pathname does not exist, or if the file does exist but is inaccessible for some reason.java.lang.InterruptedException- when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
-
importUrl
Dataset importUrl(java.lang.String url) throws ClientException, java.lang.InterruptedException
Import a dataset from a url. See the Dataset page in the documentation for size limitations.- Parameters:
url- The url to a publicly available file- Returns:
- The new
Dataset - Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.java.lang.InterruptedException- when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
-
startImportFile
java.util.concurrent.Future<Dataset> startImportFile(java.lang.String sourceFile) throws java.io.FileNotFoundException, ClientException
Start the process of uploading a dataset from a local file. This method can be used to avoid blocking during large file imports. See the Dataset page in the documentation for size limitations.- Parameters:
sourceFile- The path of the local file to upload- Returns:
FutureDataset- Throws:
java.io.FileNotFoundException- when a file with the specified pathname does not exist, or if the file does exist but is inaccessible for some reason.ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
startimportUrl
java.util.concurrent.Future<Dataset> startimportUrl(java.lang.String url) throws ClientException
Start the process of uploading a dataset from a url. This method can be used to avoid blocking during large file imports. See the Dataset page in the documentation for size limitations.- Parameters:
url- The url to a publicly available file- Returns:
FutureDataset- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
get
Dataset get(java.lang.String datasetId) throws ClientException
Retrieve a dataset- Parameters:
datasetId- The ID of the dataset to retrieve- Returns:
- The queried
Dataset - Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
list
DatasetList list() throws ClientException
Retrieve a list of uploaded datasets associated with this account- Returns:
DatasetList- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
list
DatasetList list(java.lang.String aiId) throws ClientException
Retrieve a list of uploaded datasets associated with this AI- Parameters:
aiId- Datasets for this AI will only be returned- Returns:
DatasetList- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
list
DatasetList list(PagingParams params) throws ClientException
Retrieve a list of uploaded datasets associated with this account- Parameters:
params- ThePagingParamsobject for this list- Returns:
DatasetList- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
delete
void delete(java.lang.String datasetId) throws ClientExceptionDelete a dataset- Parameters:
datasetId- The ID of the dataset to delete- Throws:
ClientException- when 4xx or 5xx response is received from server, or errors in parsing the response.
-
-