Skip to content

feat: added optional in_amundsen bool to lineage items #2010

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

Merged
merged 5 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/amundsen_common/models/lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class LineageItem:
usage: Optional[int] = None # statistic to sort lineage items by
parent: Optional[str] = None # key of the parent entity, used to create the relationships in graph
link: Optional[str] = None # internal link to redirect to different than the resource details page
in_amundsen: Optional[bool] = None # it is possible to have lineage that doesn't exist in Amundsen in that moment


class LineageItemSchema(AttrsSchema):
Expand Down
2 changes: 1 addition & 1 deletion common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import find_packages, setup

__version__ = '0.28.0'
__version__ = '0.29.0'


requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements-dev.txt')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface LineageItem {
usage: number | null;
source?: string;
link?: string;
in_amundsen?: boolean;
}

export interface Lineage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export interface LineageListProps {
}

const isTableLinkDisabled = (table: LineageItem) => {
// check if item is currently indexed in Amundsen, if it's not mark as disabled
if (table.in_amundsen === false) {
return true;
}

// use configuration to determine weather a table link is disabled or not
const disableAppListLinks = getTableLineageDisableAppListLinks();
let disabled = false;
if (disableAppListLinks) {
Expand All @@ -29,6 +35,7 @@ const isTableLinkDisabled = (table: LineageItem) => {
return disableAppListLinks![key].test(table[key]) === false;
});
}

return disabled;
};

Expand Down
2 changes: 1 addition & 1 deletion requirements-common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# It is recommended to always pin the exact version (not range) - otherwise common upgrade won't trigger unit tests
# on all repositories reyling on this file and any issues that arise from common upgrade might be missed.
amundsen-common>=0.27.0,<0.29.0
amundsen-common>=0.27.0,<0.30.0
attrs>=19.1.0
boto3==1.17.23
click==7.0
Expand Down