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

Execute statements atfer reading each record found by statement #221

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rigon
Copy link

@rigon rigon commented Jun 21, 2017

This allows to execute queries that modify data in the database after reading each record.
For example, this allows to update or delete records already imported.

Example to update records:

input {
    jdbc {
        statement => "SELECT id FROM test"
        post_statement => "UPDATE test SET flag = 1 WHERE id = :id"
    }
}

Example to delete records:

input {
    jdbc {
        statement => "SELECT id FROM test"
        post_statement => "DELETE FROM test WHERE id = :id"
    }
}

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.

1 participant