DataheraldAPIWrapper#

class langchain_community.utilities.dataherald.DataheraldAPIWrapper[source]#

Bases: BaseModel

Wrapper for Dataherald.

Docs for using:

  1. Go to dataherald and sign up

  2. Create an API key

  3. Save your API key into DATAHERALD_API_KEY env variable

  4. pip install dataherald

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param dataherald_api_key: str | None = None#
param db_connection_id: str [Required]#
run(prompt: str) str[source]#

Generate a sql query through Dataherald and parse result.

Parameters:

prompt (str) –

Return type:

str

Examples using DataheraldAPIWrapper