diff --git a/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.scss b/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.scss index bdb2b5380..b13b2021d 100644 --- a/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.scss +++ b/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.scss @@ -22,4 +22,7 @@ border-radius: var(--border-radius); } } + .DataTableViewSourceQuery-workflow { + margin-bottom: 12px; + } } diff --git a/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.tsx b/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.tsx index 879101c37..ecb833b47 100644 --- a/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.tsx +++ b/querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.tsx @@ -5,6 +5,7 @@ import { IDataTable, ILineageCollection, } from 'const/metastore'; +import { isValidUrl } from 'lib/utils'; import { getAppName } from 'lib/utils/global'; import { getWithinEnvUrl } from 'lib/utils/query-string'; import { Button } from 'ui/Button/Button'; @@ -34,6 +35,7 @@ export const DataTableViewSourceQuery: React.FunctionComponent = ({ dataJobMetadataById, }) => { const [showOldJobMetadata, setShowOldJobMetadata] = useState(false); + const jobMetadataIds = useMemo( () => Array.from( @@ -80,6 +82,26 @@ export const DataTableViewSourceQuery: React.FunctionComponent = ({ ); }); + const customProperties = table.custom_properties ?? {}; + const workflowValue = customProperties['workflow']; + const workflowDOM = + workflowValue && typeof workflowValue === 'string' ? ( +
+
+ + Workflow + +
+ {isValidUrl(workflowValue) ? ( + + {workflowValue} + + ) : ( + workflowValue + )} +
+ ) : null; + const errorDOM = jobMetadataIds.length > 0 ? null : ( @@ -99,6 +121,7 @@ export const DataTableViewSourceQuery: React.FunctionComponent = ({ return (
+ {workflowDOM} {parentDOM} {errorDOM} {showMoreDOM}