tabsdata.MariaDBSource#

class MariaDBSource(uri: str, query: str | List[str], credentials: dict | UserPasswordCredentials | None = None, initial_values: dict | None = None)[source]#

Bases: Input

Class for managing the configuration of MariaDB-based data inputs.

credentials#

The credentials required to access the MariaDB database.

Type:

UserPasswordCredentials

initial_values#

The initial values for the parameters in the SQL queries.

Type:

dict

query#

The SQL query(s) to execute. If multiple queries are provided, they must be provided as a dictionary, with the parameter name in the registered function as the key and the SQL query as the value.

Type:

str | List[str]

uri#

The URI of the database where the data is located.

Type:

str

to_dict()[source]#

Converts the MariaDBSource object to a dictionary.

__init__(uri: str, query: str | List[str], credentials: dict | UserPasswordCredentials | None = None, initial_values: dict | None = None)[source]#
Initializes the MariaDBSource with the given URI and query, and optionally

connection credentials and initial values for the parameters in the SQL queries.

Parameters:
  • uri (str) – The URI of the database where the data is located

  • query (str | List[str]) – The SQL query(s) to execute. If multiple queries are provided, they must be provided as a list, and they will be mapped to the function inputs in the same order as they are defined.

  • credentials (dict | UserPasswordCredentials, optional) – The credentials required to access the MariaDB database. Can be a dictionary or a UserPasswordCredentials object.

  • initial_values (dict, optional) – The initial values for the parameters in the SQL queries.

Raises:

InputConfigurationError

Methods

__init__(uri, query[, credentials, ...])

Initializes the MariaDBSource with the given URI and query, and optionally

Attributes

credentials

The credentials required to access MariaDB.

initial_values

The initial values for the parameters in the SQL queries.

query

The SQL query(s) to execute.

uri

The URI of the database where the data is located.