-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add more metadata support (#1182)
* feat: add table custom properties (#1165) * feat: add table custom properties * comments * update package version * feat: load tag from metastore (#1164) * feat: load tag from metastore * comments * comments * feat: add column level tag support (#1169) * feat: add column level tag support * comments * set commit False for create_table * tagsDOM * use verify_data_column_permission * ffix linter * feat: load data table ownership from metastore (#1170) * load data table owners from metastore * add tooltip * fix linter * comments * fix circular import * display name comments * display name comments * get owner types comments * feat: load user groups (#1176) * feat: load and sync user groups from metastore * remove sync group task * remove and add delta * refactor * chore: merge alembic changes (#1180) * chore: merge alembic changes * add foregin key name
- Loading branch information
Showing
37 changed files
with
667 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
querybook/migrations/versions/ec2f32c25f34_add_more_metadata_support.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""add more metadata support | ||
Revision ID: ec2f32c25f34 | ||
Revises: 1b8aba201c94 | ||
Create Date: 2023-02-24 23:46:29.304134 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'ec2f32c25f34' | ||
down_revision = '1b8aba201c94' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('data_table_information', sa.Column('custom_properties', sa.JSON(), nullable=True)) | ||
op.add_column('data_table_ownership', sa.Column('type', sa.String(length=255), nullable=True)) | ||
op.add_column('tag_item', sa.Column('column_id', sa.Integer(), nullable=True)) | ||
op.create_foreign_key('fk_tag_item_data_table_column', 'tag_item', 'data_table_column', ['column_id'], ['id'], ondelete='CASCADE') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint('fk_tag_item_data_table_column', 'tag_item', type_='foreignkey') | ||
op.drop_column('tag_item', 'column_id') | ||
op.drop_column('data_table_ownership', 'type') | ||
op.drop_column('data_table_information', 'custom_properties') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from typing import NamedTuple | ||
|
||
|
||
class UserGroup(NamedTuple): | ||
name: str | ||
display_name: str | ||
description: str | ||
email: str | ||
# list of user names | ||
members: list[str] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.