-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqueries.sql
More file actions
38 lines (34 loc) · 802 Bytes
/
queries.sql
File metadata and controls
38 lines (34 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- Verification queries for automatic embeddings example
-- Check documents table
select id, left(content, 50) as content_preview, created_at
from documents
order by created_at desc;
-- Check generated chunks with embedding preview
select
dc.id,
dc.document_id,
left(dc.content, 40) as content_preview,
dc.embedding[1:3] as embedding_preview
from document_chunks dc
order by dc.document_id, dc.id;
-- Check pgflow run status
select
run_id,
flow_slug,
status,
started_at,
remaining_steps
from pgflow.runs
order by started_at desc
limit 5;
-- Check step execution
select
r.run_id,
s.step_slug,
s.status,
s.attempts
from pgflow.step_states s
join pgflow.runs r on r.run_id = s.run_id
where r.flow_slug = 'generateEmbeddings'
order by r.started_at desc, s.step_slug
limit 20;