Class method to create an SQLDatabase instance from a CnosDB connection.
This method requires the 'cnos-connector' package. If not installed, it
can be added using pip install cnos-connector.
from_cnosdb(
cls,
url: str = '127.0.0.1:8902',
user: str = 'root',
password: str = '',
tenant: str = 'cnosdb',
database: str = 'public'
) -> SQLDatabase| Name | Type | Description |
|---|---|---|
url | str | Default: '127.0.0.1:8902'The HTTP connection host name and port number of the CnosDB service, excluding "http://" or "https://", with a default value of "127.0.0.1:8902". |
user | str | Default: 'root'The username used to connect to the CnosDB service, with a default value of "root". |
password | str | Default: ''The password of the user connecting to the CnosDB service, with a default value of "". |
tenant | str | Default: 'cnosdb'The name of the tenant used to connect to the CnosDB service, with a default value of "cnosdb". |
database | str | Default: 'public'The name of the database in the CnosDB tenant. |