Teradata Package for LangChain Function Reference - delete_documents - Teradata® Package for LangChain - Look here for syntax, methods and examples for the functions included in the Teradata langchain-teradata package.
Teradata® Package for LangChain Function Reference
- Deployment
- VantageCloud
- Edition
- Enterprise
- Product
- Teradata® Package for LangChain
- Release Number
- 20.00.00.01
- Published
- December 2025
- ft:locale
- en-US
- ft:lastEdition
- 2025-12-19
- dita:id
- Langchain-Teradata_FxRef_Lake
- Product Category
- Teradata Vantage
- libs.teradata.langchain_teradata.TeradataVectorStore.delete_documents = delete_documents(self, documents, **kwargs)
- DESCRIPTION:
Deletes documents from an existing file-based Vector Store.
PARAMETERS:
documents:
Required Argument.
Specifies the files to be deleted from the Vector Store.
It can be used to specify input documents in file format.
A directory path or wildcard pattern can also be specified.
Types: str, list
update_style:
Optional Argument.
Specifies the style to be used for alter operation of the data
from the vector store when "search_algorithm" is KMEANS/HNSW.
Default Value: MINOR
Permitted Values: MINOR, MAJOR
Types: str
metadata_operation:
Optional Argument.
Specifies the operation to be performed on metadata columns
during update.
- ADD - add new metadata columns
- DELETE - remove existing metadata columns
- MODIFY - change the description of the existing metadata columns
Note:
* Applicable to all store types except the METADATA-BASED store type.
Default Value: ADD
Permitted Values: ADD, DELETE, MODIFY
Types: str
RETURNS:
None.
RAISES:
TeradataMlException.
EXAMPLES:
# Create an instance of an 'file-based' vector store by passing path
# to a PDF file in "documents".
# Note:
# This is optional and can be skipped if the vector store is already created.
>>> from langchain_teradata import TeradataVectorStore
>>> import teradatagenai
>>> import os
>>> base_dir = os.path.dirname(teradatagenai.__file__)
>>> file = os.path.join(base_dir, 'example-data', 'SQL_Fundamentals.pdf')
>>> vs_instance = TeradataVectorStore.from_documents(name = "vs_example_1",
documents = file,
embedding = "amazon.titan-embed-text-v1")
# Delete "SQL_Fundamentals.pdf" from an existing 'file-based' vector store.
>>> vs_instance.delete_documents(documents=file)