abacusai.database_connector — AbacusAI documentation

# abacusai.database_connector

## Classes

`DatabaseConnector` | A connector to an external service

## Module Contents

class abacusai.database_connector.DatabaseConnector(client, databaseConnectorId=None, service=None, name=None, status=None, auth=None, createdAt=None)

  Bases: `abacusai.return_class.AbstractApiClass`

  A connector to an external service

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - databaseConnectorId (str) – A unique string identifier for the connection.

    - service (str) – An enum string indicating the service this connection connects to.

    - name (str) – A user-friendly name for the service.

    - status (str) – The status of the database connector.

    - auth (dict) – Non-secret connection information for this connector.

    - createdAt (str) – The ISO-8601 string indicating when the API key was created.

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  list_objects(fetch_raw_data=False)

    Lists querable objects in the database connector.

    Parameters:

      fetch_raw_data (bool) – If true, return unfiltered objects.

  get_object_schema(object_name=None, fetch_raw_data=False)

    Get the schema of an object in an database connector.

    Parameters:

      - object_name (str) – Unique identifier for the object in the external system.

      - fetch_raw_data (bool) – If true, return unfiltered list of columns.

    Returns:

      The schema of the object.

    Return type:

      DatabaseConnectorSchema

  rename(name)

    Renames a Database Connector

    Parameters:

      name (str) – The new name for the Database Connector.

  verify()

    Checks if Abacus.AI can access the specified database.

    Parameters:

      database_connector_id (str) – Unique string identifier for the database connector.

  delete()

    Delete a database connector.

    Parameters:

      database_connector_id (str) – The unique identifier for the database connector.

  query(query)

    Runs a query in the specified database connector.

    Parameters:

      query (str) – The query to be run in the database connector.