Xata

X

Xata

This is Xata's community Discord server, where we discuss all things Xata: projects, features, dreams!

Join

help

general

setting "default_tablespace" is not allowed

Hello, I'm migrating my payload3 db and when restoring I get this, and a bunch of following errors, how can I fix that?

Vercel connections timeout when using a transaction

Hi We are using Drizzle together with the TCP Pool pg client. ```ts import { drizzle as drizzlePg } from 'drizzle-orm/node-postgres';...

Type mismatch: expected vector..

Hey guys, so I have a table with a vector column with dimensions of 1536. Its naturally used to store embeddings generated via openai. Im able to save embeddings to this column via the Xata client. However.. when using the .ask method of the sdk.. im getting the following error: vector search: column [embedding]: type mismatch: expected vector (An array of floats with fixed dimension)...

I'm getting the following error when creating a record on this 'vectors' table

message: 'table [vectors]: record with ID [rec_cq8rnq04vvkm2p5ohj6g] already exists in table [vectors]', even though the table is completely empty, to create the tables i used prisma, only for the regular columns (strings, numbers etc...) and then i the vector one on the UI. any help will be appreciated, Thanks!!...
No description

Preview branches are not being created for Vercel/Github extension

I don't know why. Everything worked normal a couple days ago

File Upload URLs Fails with CORS

I’m having errors on image uploads. I’m using the uploadUrl approach where I send a request to my backend to generate the upload URL for a file. However, from the front-end, I’m getting a CORS error that I didn’t get before when trying to upload the image from the browser. Have there been any changes to those upload URLs that now don’t allow for CORS?...

xata.ts not being generated after command failure

Using react + next.js to make a portoflio. I'm trying to init my db to my project but a command fails "npm install --save @xata.io/client". I can run the command myself but it doesnt solve the issue of the xata.ts file not being generated. Please help
No description

Signed URLs in Xata dashboard (and my app) cease to function

Hi, I've just run into some problem accessing files with signed URLs in my app. All signed URLs (dynamically retrieved) of files created before a specific point cease to return the file (but rather invalid signature). Seems those retrieved from the Xata dashboard also face the same error (although files can still be downloaded and newly created files are free from this problem). ```ts // creating file attachments await xata.db.audio.create({...
No description

Cursor Pagination Broken

Hii, i am facing an error with cursor pagination where i get this error when i use the cursor to paginate through the after and before fields
cursor invalid: filter invalid: column [character-\u003eelement]: invalid identifier, column [character-\u003eelement]: invalid identifier, offset 10: invalid symbol [\], only alphanumerics and '-', '_', or '~' are allowed
cursor invalid: filter invalid: column [character-\u003eelement]: invalid identifier, column [character-\u003eelement]: invalid identifier, offset 10: invalid symbol [\], only alphanumerics and '-', '_', or '~' are allowed
this happens when i use filter on JSON nested key character->element...

How can I restrict the API access to a specific branch?

Is this even possible? I can't find anything in the docs.

Reverse links typescript

Hi there. I'm wondering if it's possible to read a ShoppingCart by it's id and also get all it's ShoppingCartLineItems in one query. I'm trying to avoid making multiple queries to the database. I've had a look at https://xata.io/blog/navigating-many-to-one and https://xata.io/docs/concepts/data-model#links-and-relationships but I'm still not sure how to do this. Schema:...

Xata issues with environment variables in NestJS

I have a simple NestJS app, generated through their cli, and have attempted to add Xata to the project to use as my database. I've ran the xata init command, and everything generated correctly and my environment variables were added to my .env file. However, where I try to run my app with pnpm start:dev (a precreated script) I get this error: ``` E:***\node_modules.pnpm@xata.io+client@0.29.5_typescript@5.4.5\node_modules@xata.io\client\src\client.ts:108 throw new Error('Option apiKey is required');...

I need help with this Django project

I worked on a link shortener app where you can create links for later, but when viewing the page in production, the home route does not display the content as it does on localhost. What may be the problem? Live URL: https://xata-link-shortner.onrender.com/...
No description

Generate pgroll migration file from a current postgres schema

Is there any way to generate a pgroll migration file from an existing postgres, to be able to populate another postgres db? If I for example would like to switch from flyway to pgroll, and just get an initial migration file?...

PGRoll constraints not visible in latest migration

Hi, I have a raw sql migration that creates a unique constraint across a few columns. I want to use this constraint to enforce an upsert workflow. However, in the schema from that migration (public_MIGRATION_NAME) the constraint isn't visible. If I switch to the public schema, it is visible and working, so I can see that it's getting created correctly. Is there something I need to do to get my constraint into my migration schema's view, or should I run another migration, or do something else? Thanks!...

Filtering searches, row size limitations

I'm currently using filters to create an exact text search but I noticed that there are row size limitations and large rows (>10KB) are being silently excluded. I'm attempting to filter documents, which can be pretty big (hundreds of KB), and I'm wondering if Xata is a good use case for this or not. I think we only care about exact keyword search sorted by date and not BM25 scoring....

Search duplication latency

I recently truncated a table, and noticed that the search usage metrics hasn't been updated. How long is the delay between updating the DB and the elasticsearch update?...

Multiple schemas in pgroll

Is it possible to migrate multiple schemas in pgroll? Let's say I have a public and a private schema, can I migrate both and keep them in sync with each other?

Raw SQL references

Let's say I want to migrate a sql function in pgroll, does the function, and all the schema objects referenced inside it, need to hard reference the new migration schema? Will this then require migrating the function and its schema objects to public on the next migration?

Complete application database OST workflow

Hi, I'm trying to use pgroll to introduce OST to postgresql database. This database is for Django application. I need help to understand how I can use pgroll in the development workflow?...
Next