Skip to content
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

Feature merge sink #794

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Conversation

zhuliquan
Copy link
Contributor

fix issue #700 merge sinks with same table, it's helpful to save file handles or kafka connectors. Besides, it may fix bug two pipeline write data to same file.
For example

CREATE TABLE cars (
        timestamp TIMESTAMP,
        driver_id BIGINT,
        event_type TEXT,
        location TEXT
) WITH (
        connector = 'single_file',
        path = 'cars.json',
        format = 'json',
        type = 'source'
);

CREATE TABLE cars_output (
        timestamp TIMESTAMP,
        driver_id BIGINT,
        event_type TEXT,
        location TEXT
) WITH (
        connector = 'single_file',
        path = 'cars_output.json',
        format = 'json',
        type = 'sink'
);
INSERT INTO cars_output SELECT * FROM cars WHERE driver_id = 100 AND event_type = 'pickup';
INSERT INTO cars_output SELECT * FROM cars WHERE driver_id = 101 AND event_type = 'dropoff';

if we don't merge sink node of two query, results of query1 will be overwrited by results of query2. Because there two sink node infer two file handle for same file (cars_output.json).

@mwylde mwylde force-pushed the feature-merge_sink branch from 1d0dbd8 to 7aaa079 Compare December 9, 2024 23:49
Copy link
Member

@mwylde mwylde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the long review time. Thanks for the change!

@mwylde mwylde merged commit 130ba60 into ArroyoSystems:master Dec 10, 2024
3 checks passed
@zhuliquan zhuliquan deleted the feature-merge_sink branch December 10, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants