-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dm_learn_from_db and MySQL #366
Comments
I wonder if |
It won't probably work as if, because you won't find in MySQL the same exact column names. Useful requests for MySQL would be something like: /*foreign keys*/
SELECT column_name, constraint_name, referenced_table_name, referenced_column_name, table_name, ordinal_position
FROM information_schema.key_column_usage
WHERE referenced_table_name IS NOT NULL
and table_schema = 'myschema'
order by table_name,ordinal_position
/*primary keys*/
SELECT column_name, constraint_name, referenced_table_name, referenced_column_name, table_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_schema = 'myschema'
AND constraint_name = 'primary'
/*column info*/
SELECT * FROM information_schema.columns WHERE table_schema = 'myschema' |
Thanks. Let me take another stab getting the internal structure right, happy to take PRs after that. |
@noamross: Now that we have an idea what I've found that, across databases, Another thing that gave me headaches for Postgres are compound keys -- |
We're very close to an implementation. Do you have a chance to test it in the next few days? |
So currently learning constraints is failing for me on a Dolt Database. Dolt has the same information schema as MariaDB/MySQL. But while |
I'm not sure the best way to fix this. Do you think a PR to |
Thanks. Would it work if we tweaked |
A hack including |
Also, for Dolt (but also possibly MySQL/RMariaDB?), the data model returned includes all the tables and columns in information_schema, as well. Perhaps we want to filter out |
Thanks. Self-reflection about Happy to review PRs. |
Dolt hack added in 337de7a. Should we add Dolt to our CI/CD (and perhaps also to RMariaDB's)? |
That would be great. Note that you're as likely to find bugs in Dolt as it's still pretty beta. (But the Dolt team responds fast, e.g. ecohealthalliance/doltr#46 (comment)). |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
looking forward to playing with this within MySQL...
The text was updated successfully, but these errors were encountered: