How do I get the AI to query my database?
I've been playing the with AI in DataGrip and it keeps giving me SQL and asking me to run it. When I insist on the AI running the queries, it tells me that datasource ‘abc’ can't be found or accessed. That's when the datasource is open right next to the AI window. Am I doing something wrong?
Please sign in to leave a comment.
An example I was asking was this: Give me a report on the most complex tables and the largest tables in the xyzzy database in the dbo schema. The database connection is named '@ABC'.
I should also mention that I have the ability to attach schemas, but most of my databases are too large to do that. I get errors about too many tokens.
Please ensure you have attached a schema as described in this section:
https://www.jetbrains.com/help/ai-assistant/ai-chat.html#attach_database_schema
If this has been done and you are generating your prompts from the chat, please upload the dump(see article below) onto our FTP https://uploads.jetbrains.com/ and provide the upload id in your reply
https://youtrack.jetbrains.com/articles/SUPPORT-A-76/How-to-collect-Chat-Dump-for-AI-Assistant-Chat-issues-troubleshooting
For this specific question I did attach the schema. But most of my schemas are too large. I would expect the AI to query the database, does it not have that capability?