Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions tutorials/notebooks/duckdb_example.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DuckDB Example\n",
"\n",
"This is a basic example of using DuckDB with LLMWare."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import duckdb\n",
"\n",
"# Connect to DuckDB\n",
"con = duckdb.connect(':memory:')\n",
"\n",
"# Create a simple table\n",
"con.execute(\"CREATE TABLE items (id INTEGER, name VARCHAR)\")\n",
"con.execute(\"INSERT INTO items VALUES (1, 'llmware')\")\n",
"\n",
"# Query the table\n",
"result = con.execute(\"SELECT * FROM items\").fetchall()\n",
"print(result)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0"
}
},
"nbformat": 4,
"nbformat_minor": 4
}