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
Schema refactor #9001
Schema refactor #9001
Conversation
- shows mindsdb triggers 'select * from information_schema.triggers' uses different set of columns for sql and http server
the same as: select * from informational_schema.<obj_type> where name=<obj_name>
'models' left for GUI
# Conflicts: # mindsdb/api/executor/datahub/datanodes/information_schema_datanode.py
# Conflicts: # mindsdb/interfaces/knowledge_base/controller.py
delete model version updated tests
from mindsdb.interfaces.database.projects import ProjectController | ||
|
||
|
||
from .system_tables import Table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to use absolute imports where possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
data = triggers_controller.get_list(project_name) | ||
|
||
columns = self.mindsdb_columns | ||
if inf_schema.session.api_type == 'sql': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need api_type
arg only for this specific case?
Is it a good idea to return a different set of columns for each API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, only for this case.
we use the whole set columns for db managers (like dbeaver) and limited set for web GUI, to make able user see only essential information
Also division between system_tables and mindsdb_tables - it is only for SQL server, to make sql clients working. In GUI we show only mindsb tables (though allow to select from all of them)
self.get_dataframe_funcs[table_name] = partial( | ||
self._get_empty_table, table_name | ||
) | ||
self.tables = {t.name: t() for t in self.tables_list} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like tables classes do not use self
. May be make them static? so we do not need to instantiate them each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to class_methods
|
CI will be with error till next midsdb_sql release |
Description
Changes:
information_schema
databaseCreated
information_schema
databaseSyntax update
SHOW:
SHOW PROJECTS
supportSHOW <object>
displays objects only from current projectSHOW <object> FROM <project name>
show models where engine='openai'
show models like 'home%'
DESCRIBE:
DESCRIBE <object_type> <object_name>
command.select * from informational_schema.<object_type> where name=<object_name>
Update the active model version:
update models_versions set active=1 where version=11 and name='task_model'
Set active task_model.11
Remove the model version:
delete from models_versions where version=2 and name='task_model'
Drop model task_model.2
Changes in project objects
Tables removed from projects (moved to information_schema):
information_schema.MODELS
in mysql server columns are extended by system columns required by db tools
For back compatibility: it is possible to select from these tables in project (for example
select * from mindsdb.models
) but this feature be removed in next updates.Added to projects:
In action
https://www.loom.com/share/5ac2ce8872384293ba4ea48bc09c2081
Dependent on mindsdb/mindsdb_sql#371
Type of change
Verification Process
To ensure the changes are working as expected:
Additional Media:
Checklist: