-
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: load tag from metastore (#1164)
* feat: load tag from metastore * comments * comments
- Loading branch information
Showing
23 changed files
with
233 additions
and
103 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
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
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
4 changes: 2 additions & 2 deletions
4
querybook/server/lib/metastore/loaders/sqlalchemy_metastore_loader.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
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,60 @@ | ||
from typing import NamedTuple, List | ||
|
||
|
||
class DataSchema(NamedTuple): | ||
name: str | ||
|
||
|
||
class DataTag(NamedTuple): | ||
name: str | ||
# below properties will be stored in tag.meta | ||
type: str = None | ||
description: str = None | ||
color: str = None | ||
|
||
|
||
class DataTable(NamedTuple): | ||
name: str | ||
|
||
# The type of table, it can be an arbitrary string | ||
type: str = None | ||
owner: str = None | ||
|
||
# description from metastore, expect HTML format | ||
description: str = None | ||
|
||
# list of tags | ||
tags: List[DataTag] = [] | ||
|
||
# Expected in UTC seconds | ||
table_created_at: int = None | ||
table_updated_at: int = None | ||
table_updated_by: str = None | ||
|
||
# size of table | ||
data_size_bytes: int = None | ||
# Location of the raw file | ||
location: str = None | ||
|
||
# Json arrays of partitions | ||
partitions: List = [] | ||
|
||
# Store the raw info here | ||
raw_description: str = None | ||
|
||
# Arrays of partition keys | ||
partition_keys: List[str] = [] | ||
|
||
# Custom properties | ||
custom_properties: dict[str, str] = None | ||
|
||
|
||
class DataColumn(NamedTuple): | ||
name: str | ||
type: str | ||
|
||
# column comment from sql query when creating the table | ||
comment: str = None | ||
|
||
# user edited description from metastore, expect HTML format | ||
description: str = None |
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.DataTableTags { | ||
flex-wrap: wrap; | ||
|
||
.Tag { | ||
.TableTag { | ||
margin: 4px 12px 4px 0px; | ||
cursor: pointer; | ||
} | ||
|
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
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.