DB-API Reference
- pytd.dbapi.connect(client=None)[source]
Establish a DB-API connection to Treasure Data.
- Parameters
client (pytd.Client, optional) – A client used to connect to Treasure Data. If not given, a client is created using default options.
- class pytd.dbapi.Connection(client)[source]
Bases:
object
The DBAPI interface to Treasure Data.
https://www.python.org/dev/peps/pep-0249/
The interface internally bundles pytd.Client. Implementation is technically based on the DBAPI interface to Treasure Data’s Presto query engine, which relies on presto-python-client: https://github.com/prestodb/presto-python-client.
- Parameters
client (pytd.Client, optional) – A client used to connect to Treasure Data.
- exception pytd.dbapi.InternalError[source]
Bases:
DatabaseError
- exception pytd.dbapi.OperationalError[source]
Bases:
DatabaseError
- exception pytd.dbapi.ProgrammingError[source]
Bases:
DatabaseError
- exception pytd.dbapi.IntegrityError[source]
Bases:
DatabaseError
- exception pytd.dbapi.DataError[source]
Bases:
DatabaseError
- exception pytd.dbapi.NotSupportedError[source]
Bases:
DatabaseError