-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for skip history (write last state to sink) #26
Comments
@gkorland could this be generalised as a feature of streams? |
Hi, is it possible to write only first key occurrence (in final database table) and dont' make a "REPLACE INTO" if a replicated key is inserted in redis? |
@mcazzador Theoretically, it's possible but requires some code changes, if you describe a little more the usecase and why you need it maybe we can come up with a solution. |
Hi, "REPLACE INTO" is not the best solution for me because i need to flag every DB records inserted on backend. REPLACE INTO in case of duplicate key (I want to protect myself from a possible case of this type without bloking error), erase my previous update fields. Maybe i can change REPLACE INTO with something like that: INSERT INTO tablename (id, value...) I thought it was already implemented in the code. |
@mcazzador you can easily change the add query by inheriting the MySqlConnector (for example in case of mysql backend) and override rgsync/rgsync/Connectors/sql_connectors.py Line 181 in c16a737
Then you can use your new connector as it was MySql connector. Is this helps? |
Thank's a lot |
I do that, maybe it could be doing better, thanks def GetUpdateQuery_noreplace(tableName, mappings, pk): |
In case when only the last key state is relevant we should be able to skip updates.
e.g.
Only one call to the DB should sent
The text was updated successfully, but these errors were encountered: