Class DatasetClient

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String datasetId)
      Delete a dataset
      Dataset get​(java.lang.String datasetId)
      Retrieve a dataset
      Action<com.google.api.client.http.HttpRequest,​com.google.api.client.http.HttpResponse> getHttpMessageTransformer()
      internal
      Dataset importFile​(java.lang.String sourceFile)
      Upload a new dataset.
      Dataset importUrl​(java.lang.String url)
      Import a dataset from a url.
      DatasetList list()
      Retrieve a list of uploaded datasets associated with this account
      DatasetList list​(PagingParams params)
      Retrieve a list of uploaded datasets associated with this account
      DatasetList list​(java.lang.String aiId)
      Retrieve a list of uploaded datasets associated with this AI
      void setHttpMessageTransformer​(Action<com.google.api.client.http.HttpRequest,​com.google.api.client.http.HttpResponse> httpMessageTransformer)
      internal
      java.util.concurrent.Future<Dataset> startImportFile​(java.lang.String fileName)
      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 local file.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DatasetClient

        public DatasetClient​(IDataRobotAIClient client)
        IDatasetClient based API operations. Users will not need to instantiate this object directly. It can be accessed through DataRobotAIClient.data().
        Parameters:
        client - DataRobotAIClient
    • Method Detail

      • getHttpMessageTransformer

        public Action<com.google.api.client.http.HttpRequest,​com.google.api.client.http.HttpResponse> getHttpMessageTransformer()
        internal
        Specified by:
        getHttpMessageTransformer in interface IDatasetClient
      • setHttpMessageTransformer

        public void setHttpMessageTransformer​(Action<com.google.api.client.http.HttpRequest,​com.google.api.client.http.HttpResponse> httpMessageTransformer)
        internal
        Specified by:
        setHttpMessageTransformer in interface IDatasetClient
      • importFile

        public 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.
        Specified by:
        importFile in interface IDatasetClient
        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

        public 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.
        Specified by:
        importUrl in interface IDatasetClient
        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

        public java.util.concurrent.Future<Dataset> startImportFile​(java.lang.String fileName)
                                                             throws ClientException,
                                                                    java.io.FileNotFoundException
        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.
        Specified by:
        startImportFile in interface IDatasetClient
        Parameters:
        fileName - 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

        public java.util.concurrent.Future<Dataset> startimportUrl​(java.lang.String url)
                                                            throws 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.
        Specified by:
        startimportUrl in interface IDatasetClient
        Parameters:
        url - The path of the url to be imported
        Returns:
        FutureDataset
        Throws:
        ClientException - when 4xx or 5xx response is received from server, or errors in parsing the response.
      • list

        public DatasetList list​(java.lang.String aiId)
                         throws ClientException
        Retrieve a list of uploaded datasets associated with this AI
        Specified by:
        list in interface IDatasetClient
        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.
      • delete

        public void delete​(java.lang.String datasetId)
                    throws ClientException
        Delete a dataset
        Specified by:
        delete in interface IDatasetClient
        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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object