SqlSourceOptions

Connection options for the SQL Server source connector.

class scamander.models.source_config.sql.SqlSourceOptions(*, driver: str = 'com.microsoft.sqlserver.jdbc.SQLServerDriver', host: str, port: int = 1433, database: str, username: str, password: str, table: str | None = None, query: str | None = None, fetch_size: int = 10000, encrypt: bool = True, trust_server_certificate: bool = False)

Bases: BaseModel

Connection options for the SQL Server source connector (JDBC).

driver

Fully qualified JDBC driver class name. Defaults to the standard Microsoft JDBC driver.

Type:

str

host

SQL Server hostname or IP address.

Type:

str

port

TCP port. Defaults to 1433.

Type:

int

database

Target database name.

Type:

str

username

Login username.

Type:

str

password

Login password.

Type:

str

table

Source table or view name (used when query is not set).

Type:

str | None

query

Custom SQL query to use as the data source instead of a plain table name. Mutually exclusive with table; query takes precedence when both are set.

Type:

str | None

fetch_size

Number of rows fetched per JDBC round-trip. Increasing this value can significantly improve throughput at the cost of driver memory. Defaults to 10000.

Type:

int

encrypt

Enable TLS encryption for the JDBC connection. Defaults to True.

Type:

bool

trust_server_certificate

Skip server certificate validation. Set to True only in development environments. Defaults to False.

Type:

bool

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].