Send feedback
  
   
 
  
    
      Class DataClient (2.19.0)
    
    
       
    
    
      
      Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
    
  
      
     
  
  
   
  
    
  
  
    
    
    
  Version 2.19.0keyboard_arrow_down  
  
 
    
    
     
    
    
    
    
    
      
  
  
  Connects to Cloud Bigtable's data manipulation APIs. 
 
  This class is used by the Cloud Bigtable wrappers to access Cloud Bigtable. Multiple bigtable::Table  objects may share a connection via a single DataClient  object. The DataClient  object is configured at construction time, this configuration includes the credentials, access endpoints, default timeouts, and other gRPC configuration options. This is an interface class because it is also used as a dependency injection point in some of the tests.
Cost 
Applications should avoid unnecessarily creating new objects of type DataClient . Creating a new object of this type typically requires connecting to the Cloud Bigtable servers, and performing the authentication workflows with Google Cloud Platform. These operations can take many milliseconds, therefore applications should try to reuse the same DataClient  instances when possible.
 
  Functions
   
  MutateRow(grpc::ClientContext *, google::bigtable::v2::MutateRowRequest const &, google::bigtable::v2::MutateRowResponse *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::MutateRowRequest const &
           
          
          
         
       
      
        response 
        
          google::bigtable::v2::MutateRowResponse *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        grpc::Status  
         
       
     
  
  AsyncMutateRow(grpc::ClientContext *, google::bigtable::v2::MutateRowRequest const &, grpc::CompletionQueue *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::MutateRowRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::MutateRowResponse > >  
         
       
     
  
  CheckAndMutateRow(grpc::ClientContext *, google::bigtable::v2::CheckAndMutateRowRequest const &, google::bigtable::v2::CheckAndMutateRowResponse *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::CheckAndMutateRowRequest const &
           
          
          
         
       
      
        response 
        
          google::bigtable::v2::CheckAndMutateRowResponse *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        grpc::Status  
         
       
     
  
  AsyncCheckAndMutateRow(grpc::ClientContext *, google::bigtable::v2::CheckAndMutateRowRequest const &, grpc::CompletionQueue *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::CheckAndMutateRowRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::CheckAndMutateRowResponse > >  
         
       
     
  
  ReadModifyWriteRow(grpc::ClientContext *, google::bigtable::v2::ReadModifyWriteRowRequest const &, google::bigtable::v2::ReadModifyWriteRowResponse *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::ReadModifyWriteRowRequest const &
           
          
          
         
       
      
        response 
        
          google::bigtable::v2::ReadModifyWriteRowResponse *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        grpc::Status  
         
       
     
  
  AsyncReadModifyWriteRow(grpc::ClientContext *, google::bigtable::v2::ReadModifyWriteRowRequest const &, grpc::CompletionQueue *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::ReadModifyWriteRowRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientAsyncResponseReaderInterface< google::bigtable::v2::ReadModifyWriteRowResponse > >  
         
       
     
  
  ReadRows(grpc::ClientContext *, google::bigtable::v2::ReadRowsRequest const &) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::ReadRowsRequest const &
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientReaderInterface< google::bigtable::v2::ReadRowsResponse > >  
         
       
     
  
  AsyncReadRows(grpc::ClientContext *, google::bigtable::v2::ReadRowsRequest const &, grpc::CompletionQueue *, void *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::ReadRowsRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
      
        tag 
        
          void *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientAsyncReaderInterface< google::bigtable::v2::ReadRowsResponse > >  
         
       
     
  
  PrepareAsyncReadRows(::grpc::ClientContext *, google::bigtable::v2::ReadRowsRequest const &, grpc::CompletionQueue *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          ::grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::ReadRowsRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::ReadRowsResponse > >  
         
       
     
  
  SampleRowKeys(grpc::ClientContext *, google::bigtable::v2::SampleRowKeysRequest const &) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::SampleRowKeysRequest const &
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientReaderInterface< google::bigtable::v2::SampleRowKeysResponse > >  
         
       
     
  
  AsyncSampleRowKeys(grpc::ClientContext *, google::bigtable::v2::SampleRowKeysRequest const &, grpc::CompletionQueue *, void *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::SampleRowKeysRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
      
        tag 
        
          void *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::SampleRowKeysResponse > >  
         
       
     
  
  virtual PrepareAsyncSampleRowKeys(grpc::ClientContext *, google::bigtable::v2::SampleRowKeysRequest const &, grpc::CompletionQueue *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::SampleRowKeysRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::SampleRowKeysResponse > >  
         
       
     
  
  MutateRows(grpc::ClientContext *, google::bigtable::v2::MutateRowsRequest const &) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::MutateRowsRequest const &
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr< grpc::ClientReaderInterface< google::bigtable::v2::MutateRowsResponse > >  
         
       
     
  
  AsyncMutateRows(::grpc::ClientContext *, google::bigtable::v2::MutateRowsRequest const &, grpc::CompletionQueue *, void *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          ::grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::MutateRowsRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
      
        tag 
        
          void *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::MutateRowsResponse > >  
         
       
     
  
  PrepareAsyncMutateRows(grpc::ClientContext *, google::bigtable::v2::MutateRowsRequest const &, grpc::CompletionQueue *) 
  the google.bigtable.v2.Bigtable  wrappers.
 
  
    
      
        Parameters  
       
      
        Name  
        Description  
       
      
        context 
        
          grpc::ClientContext *
           
          
          
         
       
      
        request 
        
          google::bigtable::v2::MutateRowsRequest const &
           
          
          
         
       
      
        cq 
        
          grpc::CompletionQueue *
           
          
          
         
       
     
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::unique_ptr<::grpc::ClientAsyncReaderInterface< google::bigtable::v2::MutateRowsResponse > >  
         
       
     
  
  project_id() const 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::string const &  
         
       
     
  
  instance_id() const 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::string const &  
         
       
     
  
  Channel() 
  Return a new channel to handle admin operations. 
 
  Intended to access rarely used services in the same endpoints as the Bigtable admin interfaces, for example, the google.longrunning.Operations.
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        std::shared_ptr< grpc::Channel >  
         
       
     
  
  reset() 
  Reset and create new Channels. 
 
  Deprecated: 
This member function is scheduled for deletion and DataClient  will be marked as final. Do not extend this class. The client library will handle all interactions with the gRPC channels. 
 
 
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        void  
         
       
     
  
  BackgroundThreadsFactory() 
  The thread factory this client was created with. 
 
  
  
    
      
        Returns  
       
      
        Type  
        Description  
       
      
        google::cloud::BackgroundThreadsFactory  
         
       
     
  
 
     
    
  
  
  
     
  
 
  
    
    
      
    
     
  
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]