langchain/docs/modules/chains/examples
Gengliang Wang bf5a3c6dec
Support Databricks in SQLDatabase (#4702)
This PR adds support for Databricks runtime and Databricks SQL by using
[Databricks SQL Connector for
Python](https://docs.databricks.com/dev-tools/python-sql-connector.html).
As a cloud data platform, accessing Databricks requires a URL as follows

`databricks://token:{api_token}@{hostname}?http_path={http_path}&catalog={catalog}&schema={schema}`.

**The URL is **complicated** and it may take users a while to figure it
out**. Since the fields `api_token`/`hostname`/`http_path` fields are
known in the Databricks notebook, I am proposing a new method
`from_databricks` to simplify the connection to Databricks.

## In Databricks Notebook
After changes, Databricks users only need to specify the `catalog` and
`schema` field when using langchain.
<img width="881" alt="image"
src="https://github.com/hwchase17/langchain/assets/1097932/984b4c57-4c2d-489d-b060-5f4918ef2f37">

## In Jupyter Notebook
The method can be used on the local setup as well:
<img width="678" alt="image"
src="https://github.com/hwchase17/langchain/assets/1097932/142e8805-a6ef-4919-b28e-9796ca31ef19">
2023-05-19 00:42:06 -07:00
..
api.ipynb Correct typo in APIChain example notebook (Farenheit -> Fahrenheit) (#4938) 2023-05-18 11:48:02 -07:00
constitutional_chain.ipynb Harrison/unified objectives (#4905) 2023-05-17 23:03:57 -07:00
flare.ipynb WIP: FLARE-inspired chain (#4612) 2023-05-13 09:28:28 -07:00
llm_bash.ipynb Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
llm_checker.ipynb Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
llm_math.ipynb Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
llm_requests.ipynb Docs refactor (#480) 2023-01-02 08:24:09 -08:00
llm_summarization_checker.ipynb Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
moderation.ipynb Minor text correction (#2298) 2023-04-02 13:54:42 -07:00
multi_prompt_router.ipynb Simplify router chain constructor signatures (#4146) 2023-05-06 09:38:17 -07:00
multi_retrieval_qa_router.ipynb Simplify router chain constructor signatures (#4146) 2023-05-06 09:38:17 -07:00
openai_openapi.yaml Harrison/openapi spec (#2474) 2023-04-06 09:47:37 -07:00
openapi.ipynb Fix documentation typos (#3870) 2023-05-01 20:58:38 -07:00
pal.ipynb Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
sqlite.ipynb Support Databricks in SQLDatabase (#4702) 2023-05-19 00:42:06 -07:00