table [Zeldadle:main/zelda_daily_boss] is not compatible with xata; please adapt it
Hello ! I created my table using Datagrip and I have this error when using the http endpoint:
15 Replies
Do we have to create the tables using Xata dashboard?
If you try to create the table via the dashboard it should show you which columns are causing a problem (you can run the create table statement in the query playground). Can you email the DDL to [email protected] ? I can then take a look and see which columns may be causing the issue and potentially offer a workaround.
https://xata.io/docs/resources/support
Support
Get help working with Xata
When I create the table on Xata it works, but when I create it from an external service I can't use the HTTP endpoint
And I have no errors on the dashboard
Is your database enabled for direct postgres access? You should see a little elephant icon next to the db name in the workspace if it is.
After creating the table, when you click on schema and migrations in the bottom left, does the UI prompt you to adapt the table?
This one ?
No, I don't have anything that tells me that the table is invalid or anything else, I really only get this error when I want to use the endpoint
Ok thanks for clarifying. Would you mind sharing the table DDL so I can try recreate the error? You can send it privately to [email protected] if you prefer.
Oh I can send it here if you want:
Thanks, let me see if I can recreate the error and get back to you.
I ran the statements in datagrip and did not get the same error. For now, I would recommend creating the database in the xata query dashboard as a workaround (tested and saw no issues).
I tested with this endpoint: https://Flavio-Moreno-s-workspace-3dpfnl.eu-central-1.xata.sh/db/Zeldadle:main/tables/zelda_daily_boss/query
ah ok, apologies, I misunderstood your initial query. I was able to recreate the error with a curl request.
I was able to create the tables with no issues but querying them returned the above error. I'll continue to investigate.
Ok, thanks for bearing with me. You can avoid this error by going to database settings and disabling the "Native SQL Table" option. Once you do so, you will be prompted to adapt your tables (when you view them in the UI, or in the "schema & migration" tab) which will add the appropriate xata columns and allow you to query the table.
However, you may need to use xata_id as your foreign key reference instead of the "id" columns in the different tables.
It works thank you !
I have a quick question: does the ‘concurrent connection’ limitation apply to http requests?
Yes. See https://xata.io/docs/rest-api/limits#rate-limits
Request rate limit: Total number of atomic HTTP requests submitted per second to any API endpoint under a branch
Concurrency limit: Number of requests executing in parallel at any given moment within a certain Store of a branch
API limitations
Specifications, best practices, and tips provided for optimizing requests