Document page content defaults to the first column present in the query or table and
metadata defaults to all other columns. Use with content_columns to overwrite the column
used for page content. Use metadata_columns to select specific metadata columns rather
than using all remaining columns.
If multiple content columns are specified, page_content’s string format will default to
space-separated string concatenation.
Parameters
Name
Description
engine
MSSQLEngine
MSSQLEngine object to connect to the MSSQL database.
table_name
str
The MSSQL database table name. (OneOf: table_name, query).
query
str
The query to execute in MSSQL format. (OneOf: table_name, query).
content_columns
List[str]
The columns to write into the page_content of the document. Optional.
metadata_columns
List[str]
The columns to write into the metadata of the document. Optional.
metadata_json_column
str
The name of the JSON column to use as the metadata’s base dictionary. Default: langchain_metadata. Optional.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class MSSQLLoader (0.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.3.0 (latest)](/python/docs/reference/langchain-google-cloud-sql-mssql/latest/langchain_google_cloud_sql_mssql.loader.MSSQLLoader)\n- [0.2.1](/python/docs/reference/langchain-google-cloud-sql-mssql/0.2.1/langchain_google_cloud_sql_mssql.loader.MSSQLLoader) \n\n MSSQLLoader(\n engine: langchain_google_cloud_sql_mssql.engine.MSSQLEngine,\n table_name: str = \"\",\n query: str = \"\",\n content_columns: typing.Optional[typing.List[str]] = None,\n metadata_columns: typing.Optional[typing.List[str]] = None,\n metadata_json_column: typing.Optional[str] = None,\n )\n\nA class for loading langchain documents from a Cloud SQL MSSQL database.\n\nMethods\n-------\n\n### MSSQLLoader\n\n MSSQLLoader(\n engine: langchain_google_cloud_sql_mssql.engine.MSSQLEngine,\n table_name: str = \"\",\n query: str = \"\",\n content_columns: typing.Optional[typing.List[str]] = None,\n metadata_columns: typing.Optional[typing.List[str]] = None,\n metadata_json_column: typing.Optional[str] = None,\n )\n\nDocument page content defaults to the first column present in the query or table and\nmetadata defaults to all other columns. Use with content_columns to overwrite the column\nused for page content. Use metadata_columns to select specific metadata columns rather\nthan using all remaining columns.\n\nIf multiple content columns are specified, page_content's string format will default to\nspace-separated string concatenation.\n\n### lazy_load\n\n lazy_load() -\u003e typing.Iterator[langchain_core.documents.base.Document]\n\nLazy Load langchain documents from a Cloud SQL MSSQL database. Use lazy load to avoid\ncaching all documents in memory at once.\n\n### load\n\n load() -\u003e typing.List[langchain_core.documents.base.Document]\n\nLoad langchain documents from a Cloud SQL MSSQL database."]]