langchain_community.document_loaders.oracleadb_loader.OracleAutonomousDatabaseLoader

class langchain_community.document_loaders.oracleadb_loader.OracleAutonomousDatabaseLoader(query: str, user: str, password: str, *, schema: Optional[str] = None, tns_name: Optional[str] = None, config_dir: Optional[str] = None, wallet_location: Optional[str] = None, wallet_password: Optional[str] = None, connection_string: Optional[str] = None, metadata: Optional[List[str]] = 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

alazy_load()

A lazy loader for Documents.

aload()

Load data into Document objects.

lazy_load()

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 (Optional[str]) –

  • tns_name (Optional[str]) –

  • config_dir (Optional[str]) –

  • wallet_location (Optional[str]) –

  • wallet_password (Optional[str]) –

  • connection_string (Optional[str]) –

  • metadata (Optional[List[str]]) –

__init__(query: str, user: str, password: str, *, schema: Optional[str] = None, tns_name: Optional[str] = None, config_dir: Optional[str] = None, wallet_location: Optional[str] = None, wallet_password: Optional[str] = None, connection_string: Optional[str] = None, metadata: Optional[List[str]] = 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 (Optional[str]) –

  • tns_name (Optional[str]) –

  • config_dir (Optional[str]) –

  • wallet_location (Optional[str]) –

  • wallet_password (Optional[str]) –

  • connection_string (Optional[str]) –

  • metadata (Optional[List[str]]) –

async alazy_load() AsyncIterator[Document]

A lazy loader for Documents.

Return type

AsyncIterator[Document]

async aload() List[Document]

Load data into Document objects.

Return type

List[Document]

lazy_load() Iterator[Document]

A lazy loader for Documents.

Return type

Iterator[Document]

load() List[Document][source]

Load data into Document objects.

Return type

List[Document]

load_and_split(text_splitter: Optional[TextSplitter] = 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