Skip to content

Commit

Permalink
feat: Show bigquery datasource table and query on UI (feast-dev#3600)
Browse files Browse the repository at this point in the history
Signed-off-by: Hai Nguyen <[email protected]>
  • Loading branch information
sudohainguyen authored Apr 21, 2023
1 parent 01a98f0 commit 58d63f7
Show file tree
Hide file tree
Showing 3 changed files with 364 additions and 6 deletions.
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"prop-types": "^15.8.1",
"protobufjs": "^7.1.1",
"query-string": "^7.1.1",
"react-code-blocks": "^0.0.9-0",
"react-query": "^3.34.12",
"react-router-dom": "6",
"react-scripts": "^5.0.0",
Expand Down
19 changes: 19 additions & 0 deletions ui/src/pages/data-sources/BatchSourcePropertiesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
} from "@elastic/eui";
import { CopyBlock, atomOneDark } from "react-code-blocks";
import { feast } from "../../protos";
import { toDate } from "../../utils/timestamp";

Expand Down Expand Up @@ -61,6 +62,24 @@ const BatchSourcePropertiesView = (props: BatchSourcePropertiesViewProps) => {
</EuiDescriptionListDescription>
</React.Fragment>
)}
{batchSource.bigqueryOptions && (
<React.Fragment>
<EuiDescriptionListTitle>Source {batchSource.bigqueryOptions.table ? "Table" : "Query"}</EuiDescriptionListTitle>
{batchSource.bigqueryOptions.table ? (
<EuiDescriptionListDescription>
{batchSource.bigqueryOptions.table}
</EuiDescriptionListDescription>
) : <CopyBlock
text={batchSource.bigqueryOptions.query}
language="sql"
showLineNumbers={false}
theme={atomOneDark}
wrapLines
/>
}

</React.Fragment>
)}
{batchSource.meta?.latestEventTimestamp && (
<React.Fragment>
<EuiDescriptionListTitle>Latest Event</EuiDescriptionListTitle>
Expand Down
Loading

0 comments on commit 58d63f7

Please sign in to comment.