domino logo
Domino API
Domino Data API
Install the Data APIAuthentication
Data Source Use Cases
Tabular StoreObject StoreWrite to Local FileCustom AuthenticationConfiguration Override
TrainingSets Use Cases
Create TrainingSetsRetrieve TrainingSetsUpdate TrainingSetDelete TrainingSets
Python Wrapper for Domino APIDomino R Package
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
Domino APIs
>
Domino Data API
>
Data Source Use Cases
>
Tabular Store

Tabular Store

Setup

Note

Authentication

The Datasource client uses environment variables available in the workspace to automatically authenticate your identity.

To override this behavior, see Custom Authentication.

Usage

Assuming a Datasource named redshift-test has been configured with valid credentials for the current user:

from domino.data_sources import DataSourceClient

# instantiate a client and fetch the datasource instance
redshift = DataSourceClient().get_datasource("redshift-test")

query = """
     SELECT
         firstname,
         lastname,
         age
     FROM
         employees
     LIMIT 1000
 """

 # res is a simple wrapper of the query result
 res = redshift.query(query)
 # to_pandas() loads the result into a pandas dataframe
 df = res.to_pandas()
 # check the first 10 rows
 df.head(10)
Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.