Skip to content

Commit

Permalink
[ui] display all columns in table for upsert (#1858)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Jun 21, 2024
1 parent 7dc047d commit 768e78a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ui/app/mirrors/create/qrep/qrep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export default function QRepConfigForm({
const [sourceTables, setSourceTables] = useState<
{ value: string; label: string }[]
>([]);
const [allColumns, setAllColumns] = useState<
{ value: string; label: string }[]
>([]);
const [watermarkColumns, setWatermarkColumns] = useState<
{ value: string; label: string }[]
>([]);
Expand Down Expand Up @@ -106,6 +109,13 @@ export default function QRepConfigForm({
const filteredCols = cols?.filter((col) =>
allowedTypesForWatermarkColumn.includes(col.split(':')[1])
);

setAllColumns(
cols.map((col) => ({
value: col.split(':')[0],
label: `${col.split(':')[0]} (${col.split(':')[1]})`,
}))
);
setWatermarkColumns(
filteredCols.map((col) => ({
value: col.split(':')[0],
Expand Down Expand Up @@ -205,7 +215,7 @@ export default function QRepConfigForm({
/>
) : setting.label === 'Upsert Key Columns' ? (
<UpsertColsDisplay
columns={watermarkColumns}
columns={allColumns}
loading={loading}
setter={setter}
setting={setting}
Expand Down

0 comments on commit 768e78a

Please sign in to comment.