CData Python Connector for CockroachDB
The CData Python Connector for CockroachDB allows developers to write Python scripts with connectivity to Cockroach DB. The connector wraps the complexity of accessing Cockroach DB data in an interface commonly used by python connectors to common database systems.
- A variety of WHL files that accommodate several execution environments after installation with "pip install".
- Supported for Python 3.6 and Python 3.7 (including Anacondas), within both Windows and Linux, whether 64-bit or 32-bit. A wheel for for Python 3.8 distributions on Mac is also available.
- Write and execute SQL queries to fetch and update data in Cockroach DB.
- Custom dialect class that enables SQLAlchemy ORM to use this connector.
See はじめに to install the connector to your python distribution and to create a basic connection to Cockroach DB.
Using the Python Connector
See コネクタの使用 for examples of executing basic SELECT, INSERT, UPDATE, DELETE, and EXECUTE queries with the module's provided classes. See to connect Cockroach DB data to tools such as Pandas.
SQLAlchemy can be leveraged to model the tables in Cockroach DB with mapped classes. See SQLAlchemy から for instructions for configuring the Python connector with SQLAlchemy.
Pandas' DataFrames can be used alongside the connector to generate analytical graphics. See Pandas から for a guide.
See スキーマ検出 to query the provided system tables, which allows users to discover the available tables, views, and stored procedure, alongside additional information about their columns or parameters.
Connection String Options
The Connection properties describe the various options that can be used to establish a connection.