ElCarroLoader(
elcarro_engine: langchain_google_el_carro.engine.ElCarroEngine,
table_name: str = "",
query: str = "",
content_columns: typing.Optional[typing.List[str]] = None,
metadata_columns: typing.Optional[typing.List[str]] = None,
metadata_json_column: typing.Optional[str] = None,
)
A class for loading langchain documents from an ElCarro-Oracle database.
Methods
ElCarroLoader
ElCarroLoader(
elcarro_engine: langchain_google_el_carro.engine.ElCarroEngine,
table_name: str = "",
query: str = "",
content_columns: typing.Optional[typing.List[str]] = None,
metadata_columns: typing.Optional[typing.List[str]] = None,
metadata_json_column: typing.Optional[str] = None,
)
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 |
elcarro_engine |
ElCarroEngine
ElCarroEngine object to connect to the database. |
table_name |
str
The database table name. (OneOf: table_name, query). |
query |
str
The query to execute in Oracle format. (OneOf: table_name, query). |
content_columns |
List[str]
The columns to write into the |
metadata_columns |
List[str]
The columns to write into the |
metadata_json_column |
str
The name of the JSON column to use as the metadata’s base dictionary. Default: |
lazy_load
lazy_load() -> typing.Iterator[langchain_core.documents.base.Document]
Lazy Load langchain documents from an Elcarro-Oracle database.
Returns | |
---|---|
Type | Description |
(Iterator[langchain_core.documents.Document]) | a list of Documents with metadata from specific columns. |
load
load() -> typing.List[langchain_core.documents.base.Document]
Load langchain documents from an Elcarro-Oracle database.
Returns | |
---|---|
Type | Description |
(List[langchain_core.documents.Document]) | a list of Documents with metadata from specific columns. |