Build Your First Query¶
Start with the Smallest Query¶
- Returns the default set of columns (
id,distance,document,metadata). - Works on a single collection. There is no
JOINsupport – run multiple queries and merge results in Python if you need cross-collection logic.
Myth
SELECT * fetches everything, including embeddings. In reality embeddings are excluded.
If you need vectors, you must explicitly include the embedding column in the query.
Choose Your Projection¶
metadata.categorydrills into nested metadata.
Schema context
metadata.category and metadata.price are metadata keys on the sample products collection described above.
- Use
ASto rename columns:
Tip
metadata.foo pulls from your metadata JSON, not the document.
Fields stored directly on the document (via document) are separate.
- Need Help?
Check the troubleshooting guide for fixes to the most common ChromaSQL hiccups.