N
Neon2y ago
exotic-emerald

invalid input syntax for type bigint when importing vectors from CSV

Hello everyone is this the right place for asking for help? I get this error when trying to follow the documentation for importing from CSV files. I have created all my embeddings and stored them in a CSV
wayrapro=> \copy embeddings FROM 'src/assets/vector-sample.csv' DELIMITER ',' CSV HEADER
ERROR: invalid input syntax for type bigint: "[0.0005613795947283506, 0.04955139756202698, 0.04651619866490364, 0.04
wayrapro=> \copy embeddings FROM 'src/assets/vector-sample.csv' DELIMITER ',' CSV HEADER
ERROR: invalid input syntax for type bigint: "[0.0005613795947283506, 0.04955139756202698, 0.04651619866490364, 0.04
This is a row in my csv
"[0.0005613795947283506, 0.04955139756202698, 0.04651619866490364,... ]","When you run a ... these cases."
"[0.0005613795947283506, 0.04955139756202698, 0.04651619866490364,... ]","When you run a ... these cases."
No description
14 Replies
adverse-sapphire
adverse-sapphire2y ago
int8 is the same as bigint So Postgres is trying to interpret you vector as an int8 (id column)
exotic-emerald
exotic-emeraldOP2y ago
hmmm....oh i think i understand what is the problem....i wanted the id to be autogenerated. so i needed to specify the columns \copy embeddings(embedding,value) FROM 'src/assets/vector-sample.csv' DELIMITER ',' CSV HEADER
adverse-sapphire
adverse-sapphire2y ago
yes, that sounds right
exotic-emerald
exotic-emeraldOP2y ago
this works Thanks 🙂 I'm a bit rusty from SQL
adverse-sapphire
adverse-sapphire2y ago
glad you figured it out! me too lol
exotic-emerald
exotic-emeraldOP2y ago
jajaja xD
exotic-emerald
exotic-emeraldOP2y ago
I get permission_denied whenever I try to create an embedding extension (rather than pg_vector) is pgembedding no longer supported? it seemed to be supported in July 2023 https://blog.langchain.dev/neon-x-langchainhnsw-in-postgres-with-pg_embedding/
LangChain Blog
Neon x LangChain: HNSW in Postgres with pg_embedding
Editor’s Note: This blog post was written in collaboration with the Neon team (Raouf Chebri in particular). The vectorstore space is on fire, and we’re excited to highlight new implementations and options. We’re also really excited by the detailed analysis done here, bringing some solid stats and
adverse-sapphire
adverse-sapphire2y ago
@Atahualpa pg_embedding can no longer be used by new customers @Mahmoud or @Daniel do you guys know if we have any content about moving away from pg_embedding to pgvector?
deep-jade
deep-jade2y ago
Hey, we do. You can find it here: https://neon.tech/docs/extensions/pg_embedding
Neon
The pg_embedding extension (Support Discontinued) - Neon Docs
As of Sept 29, 2023, Neon is no longer committing to pg_embedding. Support will remain in place for existing users of the extension, but we strongly encourage migrating to pgvector. For migration inst...
exotic-emerald
exotic-emeraldOP2y ago
oh i see... that's sad to hear. I was really hoping to use HNSW
adverse-sapphire
adverse-sapphire2y ago
Unfortunately pgvector hasn't committed to hnsw
deep-jade
deep-jade2y ago
Hey, pgvector now supports HNSW indexes.
adverse-sapphire
adverse-sapphire2y ago
News to me. Cool! Maybe I was thinking of DiskANN or something
exotic-emerald
exotic-emeraldOP2y ago
Ohhh that's awesome to hear! Thanks! 😄

Did you find this page helpful?