Links

Organize Data Into Buckets

To synchronize different sets of data to each user, data is organized into buckets.
Each user can sync a number of buckets (up to 1,000), and each bucket defines a set of tables and rows to sync.
This is defined using two queries:
  1. 1.
    Select bucket parameters from an user id and/or other parameters.
  2. 2.
    Select data in the bucket using the bucket parameters.
An example:
bucket_definitions:
by_user:
# Select parameters for the bucket, using the current user_id
parameters: SELECT token_parameters.user_id as user_id
data:
# Select data rows using the parameters above
- SELECT * FROM lists WHERE owner_id = bucket.user_id