sql_database
sqllocks_spindle.engine.sinks.sql_database
¶
Classes¶
SQLDatabaseSink
¶
Delegate sink that writes chunks to a Fabric SQL Database (or Azure SQL / Warehouse).
Thin wrapper around
:class:~sqllocks_spindle.fabric.FabricSqlDatabaseWriter.
Accumulates numpy array chunks as DataFrames per table, then flushes via
write() on close.
Requires pip install sqllocks-spindle[fabric-sql].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_string
|
str
|
pyodbc connection string for the SQL endpoint. |
required |
auth_method
|
str
|
|
'cli'
|
schema_name
|
str
|
Target SQL schema (default |
'dbo'
|
mode
|
str
|
Write mode — |
'create_insert'
|
batch_size
|
int
|
Rows per INSERT batch (default 5 000). |
5000
|
staging_lakehouse_path
|
str | None
|
Optional abfss:// staging path to enable COPY INTO for Fabric Warehouse targets (faster bulk load). |
None
|
client_id
|
str | None
|
Service principal client ID (required when auth_method="spn"). |
None
|
client_secret
|
str | None
|
Service principal secret (required when auth_method="spn"). |
None
|
tenant_id
|
str | None
|
Azure AD tenant ID (required when auth_method="spn"). |
None
|