How to use the hdbcli.dbapi.Error function in hdbcli

To help you get started, we’ve selected a few hdbcli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / sqlalchemy-hana / test / test_suite.py View on Github external
def test_detection_by_error_code(self):
        from hdbcli.dbapi import Error

        dialect = testing.db.dialect
        assert dialect.is_disconnect(Error(-10709, 'Connect failed'), None, None)
github SUSE / shaptools / shaptools / hdb_connector / connectors / dbapi_connector.py View on Github external
https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/ee592e89dcce4480a99571a4ae7a702f.html

        Example:
            To avoid automatic reconnection set RECONNECT='FALSE' as parameter
        """
        self._logger.info('connecting to SAP HANA database at %s:%s', host, port)
        self.__properties = kwargs
        try:
            self._connection = dbapi.connect(
                address=host,
                port=port,
                #user=kwargs.get('user'),
                #password=kwargs.get('password'),
                **self.__properties
            )
        except dbapi.Error as err:
            raise base_connector.ConnectionError('connection failed: {}'.format(err))
        self._logger.info('connected successfully')

hdbcli

SAP HANA Python Client

SAP DEVELOPER LICENSE AGREEME…
Latest version published 15 days ago

Package Health Score

67 / 100
Full package analysis

Similar packages