-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat: add data elements to demo #1232
Conversation
czgu
commented
Apr 22, 2023
- also fixed some issues with string data element
- added tags and data element in demo
- hide data element search if it is not available
data_element = None | ||
if data_element_tuple: | ||
if type(data_element_tuple) is str: | ||
data_element = get_data_element_by_name(data_element_tuple, session=session) | ||
elif data_element_tuple.name and data_element_tuple.type: | ||
data_element = create_or_update_data_element( | ||
metastore_id, data_element_tuple, session=session | ||
) | ||
|
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.
does it need to check the data_element is None
again here?
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.
i added a check on line 148
queryMetastores.find((metastore) => metastore.id === metastoreId); | ||
const queryMetastoreHasDataElements = | ||
!!queryMetastore?.flags?.has_data_element; |
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.
nit: queryMetastores.some((metastore) => metastore.id === metastoreId && !!metastore.flags?.has_data_element)
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.
i think its better to find the queryMetastore first and then check if it has data elements. Using some
make the logic harder to understand and less extensible
* feat: add data elements to demo * resolved comments