OracleAutonomousDatabaseLoader#
- class langchain_community.document_loaders.oracleadb_loader.OracleAutonomousDatabaseLoader(query: str, user: str, password: str, *, schema: str | None = None, tns_name: str | None = None, config_dir: str | None = None, wallet_location: str | None = None, wallet_password: str | None = None, connection_string: str | None = None, metadata: List[str] | None = None)[source]#
Load from oracle adb
Autonomous Database connection can be made by either connection_string or tns name. wallet_location and wallet_password are required for TLS connection. Each document will represent one row of the query result. Columns are written into the page_content and ‘metadata’ in constructor is written into ‘metadata’ of document, by default, the ‘metadata’ is None.
init method :param query: sql query to execute :param user: username :param password: user password :param schema: schema to run in database :param tns_name: tns name in tnsname.ora :param config_dir: directory of config files(tnsname.ora, wallet) :param wallet_location: location of wallet :param wallet_password: password of wallet :param connection_string: connection string to connect to adb instance :param metadata: metadata used in document
Methods
__init__
(query, user, password, *[, schema, ...])init method :param query: sql query to execute :param user: username :param password: user password :param schema: schema to run in database :param tns_name: tns name in tnsname.ora :param config_dir: directory of config files(tnsname.ora, wallet) :param wallet_location: location of wallet :param wallet_password: password of wallet :param connection_string: connection string to connect to adb instance :param metadata: metadata used in document
A lazy loader for Documents.
aload
()Load data into Document objects.
A lazy loader for Documents.
load
()Load data into Document objects.
load_and_split
([text_splitter])Load Documents and split into chunks.
- Parameters:
query (str)
user (str)
password (str)
schema (str | None)
tns_name (str | None)
config_dir (str | None)
wallet_location (str | None)
wallet_password (str | None)
connection_string (str | None)
metadata (List[str] | None)
- __init__(query: str, user: str, password: str, *, schema: str | None = None, tns_name: str | None = None, config_dir: str | None = None, wallet_location: str | None = None, wallet_password: str | None = None, connection_string: str | None = None, metadata: List[str] | None = None)[source]#
init method :param query: sql query to execute :param user: username :param password: user password :param schema: schema to run in database :param tns_name: tns name in tnsname.ora :param config_dir: directory of config files(tnsname.ora, wallet) :param wallet_location: location of wallet :param wallet_password: password of wallet :param connection_string: connection string to connect to adb instance :param metadata: metadata used in document
- Parameters:
query (str)
user (str)
password (str)
schema (str | None)
tns_name (str | None)
config_dir (str | None)
wallet_location (str | None)
wallet_password (str | None)
connection_string (str | None)
metadata (List[str] | None)
- async alazy_load() AsyncIterator[Document] #
A lazy loader for Documents.
- Return type:
AsyncIterator[Document]
- load_and_split(text_splitter: TextSplitter | None = None) list[Document] #
Load Documents and split into chunks. Chunks are returned as Documents.
Do not override this method. It should be considered to be deprecated!
- Parameters:
text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns:
List of Documents.
- Return type:
list[Document]
Examples using OracleAutonomousDatabaseLoader