Skip to content

Instantly share code, notes, and snippets.

@johntbush
Last active September 18, 2017 05:32
Show Gist options
  • Save johntbush/bd338bf1428f556788c03452d9be9fae to your computer and use it in GitHub Desktop.
Save johntbush/bd338bf1428f556788c03452d9be9fae to your computer and use it in GitHub Desktop.
cassandra tables examples
create table suid (
suid UUID PRIMARY KEY,
context TEXT,
ownerkey TEXT,
label TEXT,
environment UUID,
created TIMESTAMP,
createdby TEXT,
modified TIMESTAMP,
modifiedby TEXT,
organizations SET<UUID>
);
CREATE TABLE rateset_seller(
seller_org_id uuid,
buyer_org_id uuid,
buyer_org_name text,
seller_org_name text,
scac text,
rate_scac text,
ownerkey text,
ratesetid uuid,
legacy_ratesetid int,
name text,
contract_name text,
contact_email text,
contract_number text,
effective_from date,
effective_thru date,
created_on timestamp,
last_modified timestamp,
ratetables list <frozen<ratetable>>,
PRIMARY KEY (seller_org_id, buyer_org_id, ratesetid);
CREATE TABLE rating_exceptions (
ownerkey text,
bat_create_dtm_year int,
bat_create_dtm_week int,
fbid text,
eventdate timestamp,
env_name text,
environment uuid,
data text,
modified timestamp,
resolved boolean,
error text,
retries int,
stacktrace text,
took_ms int,
PRIMARY KEY ((ownerkey, bat_create_dtm_year, bat_create_dtm_week), fbid, eventdate)
)
WITH CLUSTERING ORDER BY (fbid DESC, eventdate DESC);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment