tabsdata.MariaDBDestination
- class MariaDBDestination(
- uri: str,
- destination_table: List[str] | str,
- credentials: UserPasswordCredentials = None,
- if_table_exists: Literal['append', 'replace'] = 'append',
Bases:
DestinationPluginMariaDB-based data outputs.
- __init__(
- uri: str,
- destination_table: List[str] | str,
- credentials: UserPasswordCredentials = None,
- if_table_exists: Literal['append', 'replace'] = 'append',
Initializes the MariaDBDestination with the given URI and destination table, and optionally connection credentials.
- Parameters:
uri – The URI of the database where the data is going to be stored.
destination_table – The tables to create. If multiple tables are provided, they must be provided as a list.
credentials – The credentials required to access the MariaDB database. Must be a UserPasswordCredentials object.
if_table_exists ({'append', 'replace'}, optional) – The strategy to follow when the table already exists. Defaults to ‘append’. - ‘replace’ will create a new database table, overwriting an existing one. - ‘append’ will append to an existing table.
- Raises:
OutputConfigurationError –
Methods
__init__(uri, destination_table[, ...])Initializes the MariaDBDestination with the given URI and destination table, and optionally connection credentials.
chunk(working_dir, *results)Store the results in the SQL destination.
stream(working_dir, *results)Trigger the exporting of the data.
write(files)Given a file or a list of files, write to the desired destination.
Attributes
credentialsThe credentials required to access the MariaDB database.
destination_tableThe table(s) to create.
if_table_existsThe strategy to follow when the table already exists.
uriThe URI of the database where the data is going to be stored.