Skip to main content
This notebook goes over how to use the dataherald component. First, you need to set up your Dataherald account and get your API KEY:
  1. Go to Dataherald to sign up
  2. Once you are logged in your Admin Console, create an API KEY
  3. pip install dataherald
Then we will need to set some environment variables:
  1. Save your API KEY into DATAHERALD_API_KEY env variable
pip install dataherald
pip install -qU langchain-community
import os

os.environ["DATAHERALD_API_KEY"] = ""
from langchain_community.utilities.dataherald import DataheraldAPIWrapper
dataherald = DataheraldAPIWrapper(db_connection_id="65fb766367dd22c99ce1a12d")
dataherald.run("How many employees are in the company?")
'select COUNT(*) from employees'