Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save natalia-chikina/fb0d0779f79a7083fbc7484405e85d7f to your computer and use it in GitHub Desktop.
Save natalia-chikina/fb0d0779f79a7083fbc7484405e85d7f to your computer and use it in GitHub Desktop.
CREATE TABLE IF NOT EXISTS streamingInventoryEvents(
locationType text,
locationId int,
cacheTime timestamp,
tag text,
time timestamp,
scanType int,
pieceTag text,
repId int,
ip text,
itemNumber text,
PRIMARY KEY((locationType, locationId), cacheTime, tag, itemNumber)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
CREATE TABLE IF NOT EXISTS streamingInventories (
locationType text,
locationId int,
cacheTime timestamp,
PRIMARY KEY((locationType, locationId), cacheTime)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
CREATE TABLE IF NOT EXISTS streamingInventoriesProducts (
locationType text,
locationId int,
cacheTime timestamp,
itemNumber text,
productCount int,
PRIMARY KEY((locationType, locationId), cacheTime, itemNumber)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment