destinations.impl.sqlalchemy.factory
sqlalchemy Objects
class sqlalchemy(Destination[SqlalchemyClientConfiguration,
"SqlalchemyJobClient"])
__init__
def __init__(credentials: t.Union[SqlalchemyCredentials, t.Dict[str, t.Any],
str, "Engine"] = None,
create_unique_indexes: bool = False,
create_primary_keys: bool = False,
destination_name: t.Optional[str] = None,
environment: t.Optional[str] = None,
engine_args: t.Optional[t.Dict[str, t.Any]] = None,
**kwargs: t.Any) -> None
Configure the Sqlalchemy destination to use in a pipeline.
All arguments provided here supersede other configuration sources such as environment variables and dlt config files.
Arguments:
credentials
Union[SqlalchemyCredentials, Dict[str, Any], str, Engine], optional - Credentials to connect to the sqlalchemy database. Can be an instance ofSqlalchemyCredentials
or a connection string in the formatmysql://user:password@host:port/database
. Defaults to None.create_unique_indexes
bool, optional - Whether UNIQUE constraints should be created. Defaults to False.create_primary_keys
bool, optional - Whether PRIMARY KEY constraints should be created. Defaults to False.destination_name
Optional[str], optional - The name of the destination. Defaults to None.environment
Optional[str], optional - The environment to use. Defaults to None.engine_args
Optional[Dict[str, Any]], optional - Additional arguments to pass to the SQLAlchemy engine. Defaults to None.**kwargs
Any - Additional arguments passed to the destination.
Returns:
None