Skip to content

Commit

Permalink
remove query box, truncate step
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Mar 7, 2024
1 parent cbf23bd commit c520849
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
9 changes: 0 additions & 9 deletions flow/connectors/postgres/qrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,6 @@ func (c *PostgresConnector) SetupQRepMetadataTables(ctx context.Context, config
}
c.logger.Info("Setup metadata table.")

if config.WriteMode != nil &&
config.WriteMode.WriteType == protos.QRepWriteType_QREP_WRITE_MODE_OVERWRITE {
_, err = c.conn.Exec(ctx,
"TRUNCATE TABLE "+config.DestinationTableIdentifier)
if err != nil {
return fmt.Errorf("failed to TRUNCATE table before query replication: %w", err)
}
}

return nil
}

Expand Down
1 change: 1 addition & 0 deletions ui/app/mirrors/create/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export const handleCreateQRep = async (
}

if (config.sourcePeer?.snowflakeConfig) {
config.query = 'SELECT * FROM ' + config.watermarkTable;
if (config.watermarkTable == '') {
notify('Please fill in the source table');
return;
Expand Down
15 changes: 0 additions & 15 deletions ui/app/mirrors/create/qrep/snowflakeQrep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { MirrorSetter } from '../../types';
import { fetchAllTables } from '../handlers';
import { MirrorSetting, blankSnowflakeQRepSetting } from '../helpers/common';
import { snowflakeQRepSettings } from '../helpers/qrep';
import QRepQuery from './query';

interface SnowflakeQRepProps {
mirrorConfig: QRepConfig;
Expand Down Expand Up @@ -82,20 +81,6 @@ export default function SnowflakeQRepForm({
}, [setter]);
return (
<>
<Label>
Snowflake to PostgreSQL Query Replication currently only supports
full-table streaming replication with overwrite mode. More features
coming soon!
</Label>
<QRepQuery
query={mirrorConfig.query}
setter={(val: string) => {
setter((curr) => ({
...curr,
query: val,
}));
}}
/>
{mirrorConfig.sourcePeer?.name ? (
snowflakeQRepSettings.map((setting, id) => {
return (
Expand Down

0 comments on commit c520849

Please sign in to comment.