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

Change tracking support in SQL devices #4

Open
ashalkhakov opened this issue Sep 18, 2015 · 0 comments
Open

Change tracking support in SQL devices #4

ashalkhakov opened this issue Sep 18, 2015 · 0 comments

Comments

@ashalkhakov
Copy link

We have implemented change tracking operators in MSSQL device following the MS SQL Server change tracking support:

  1. CHANGETABLE_CHANGES(table,Long): table (maps to CHANGETABLE(CHANGES...) operator in SQL Server): returns some change tracking information, keyed by the clustering key of the table
  2. CHANGE_TRACKING_MIN_VALID_VERSION(table): Long (maps to operator of the same name in SQL Server): returns the minimal version among all rows in the table
  3. CHANGE_TRACKING_CURRENT_VERSION() (maps to operator of the same same in SQL Server); this function, when added to a table which has change tracking enabled, will yield the version of every row
    (We haven't implemented CHANGETABLE(VERSION ...) at the moment.)

Refer to: https://technet.microsoft.com/en-us/library/cc280358%28v=sql.105%29.aspx

A few questions:

  1. Is anybody interested in change tracking for other databases?
  2. Perhaps a unified change tracking API needs to be added to D4? For instance, a new tag Storage.ChangeTrackingType could be used to emit additional DDL statements during reconciliation (for SQL Server change tracking, it is necessary to (a) enable database-wide change tracking, (b) enable change tracking for tables; in Postgres, for every tracked table, have to create insert/update/delete triggers and a tombstone)
  3. Not sure what it means to use change tracking for different devices? Wouldn't that wreak havoc? The timestamps/versions would be incompatible, wouldn't they?
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

No branches or pull requests

1 participant