Hi everyone,
I’m trying to run a search query in my Supabase vector database from an n8n workflow, but I keep getting this error:
“Error searching for documents: 42P01 relation “dna_builder_personality_interview” does not exist null”
What confuses me is that my actual database/table has a different name — I created a database called “dna_builder_personality_interview". but then I have deleted it. The new one if called: “brand ia analysis”.
To create the database I used this:
-- Enable the pgvector extension to work with embedding vectors
create extension vector;
-- Create a table to store your documents
create table documents (
id bigserial primary key,
content text, -- corresponds to Document.pageContent
metadata jsonb, -- corresponds to Document.metadata
embedding vector(1536) -- 1536 works for OpenAI embeddings, change if needed
);
-- Create a function to search for documents
create function match_documents (
query_embedding vector(1536),
match_count int default null,
filter jsonb DEFAULT '{}'
) returns table (
id bigint,
content text,
metadata jsonb,
similarity float
)
language plpgsql
as $$
#variable_conflict use_column
begin
return query
select
id,
content,
metadata,
1 - (documents.embedding <=> query_embedding) as similarity
from documents
where metadata @> filter
order by documents.embedding <=> query_embedding
limit match_count;
end;
$$;
My questions:
- Why would n8n (or the integration) be trying to query
dna_builder_personality_interviewinstead of my real table name?
Thanks in advance for any pointers!