Complete the code to import the correct database loader from LangChain.
from langchain.document_loaders import [1]
The SQLDatabaseLoader is used to load data from SQL databases in LangChain.
Complete the code to create a connection string for a SQLite database.
connection_string = 'sqlite:///[1]'
The connection string for SQLite requires the database file name with extension, like mydatabase.db.
Fix the error in the code to load documents from a SQL database using LangChain.
from langchain.document_loaders import SQLDatabaseLoader loader = SQLDatabaseLoader(connection_string=[1]) docs = loader.load()
The connection string must be a string literal with quotes, like 'sqlite:///mydatabase.db'.
Fill both blanks to create a SQLDatabaseLoader and load documents.
from langchain.document_loaders import [1] loader = [2](connection_string='sqlite:///example.db') docs = loader.load()
You need to import SQLDatabaseLoader and then create an instance of it to load documents from the database.
Fill all three blanks to create a SQLDatabaseLoader, load documents, and print the number of documents loaded.
from langchain.document_loaders import [1] loader = [2](connection_string='sqlite:///data.db') docs = loader.[3]() print(len(docs))
load_documents() which does not exist.You import and instantiate SQLDatabaseLoader, then call its load() method to get documents.