Add load() to snowflake loader (#5956)

Quick fix for recently added [snowflake data
loader](https://github.com/hwchase17/langchain/pull/5825/files).
This commit is contained in:
Lance Martin 2023-06-09 11:27:29 -07:00 committed by GitHub
parent 3678cba0be
commit f3e7ac0a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,3 +118,6 @@ class SnowflakeLoader(BaseLoader):
metadata = {k: v for k, v in row.items() if k in metadata_columns} metadata = {k: v for k, v in row.items() if k in metadata_columns}
doc = Document(page_content=page_content, metadata=metadata) doc = Document(page_content=page_content, metadata=metadata)
yield doc yield doc
def load(self) -> List[Document]:
return list(self.lazy_load())