Skip to content

Commit 0b8e0c3

Browse files
committed
update per suggession
1 parent 03d041c commit 0b8e0c3

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

articles/cosmos-db/cassandra/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- name: Wire protocol support
88
href: support.md
99
- name: Tokens and the Token function
10-
href: token-overview.md
10+
href: tokens.md
1111
- name: FAQ
1212
href: cassandra-faq.yml
1313
- name: Quickstarts

articles/cosmos-db/cassandra/token-overview.md renamed to articles/cosmos-db/cassandra/tokens.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,23 @@ The Token Function is a function available via the CQL API of a Cassandra cluste
2626
Note though, this type of restriction on Apache Cassandra is arbitrary, and is only applied on constant values being passed to the function. The most notable usage of the Token function is with applying relations on the token of the partition key. Azure Cosmos DB for Apache Cassandra allows for `SELECT` queries to make use of a `WHERE` clause filtering on the tokens of your data instead of the data itself.
2727

2828
```sql
29-
SELECT token(accounted) FROM uprofile.accounts;
30-
name | accountid | city | state | country
31-
-------+-----------+-------+-------+---------
32-
Ade M | 405 | Benin | Edo | NGR
29+
SELECT token(accountid) FROM uprofile.accounts;
30+
31+
system.token(accountid)
32+
-------------------------
33+
2601062599670757427
34+
2976626013207263698
35+
36+
```
37+
38+
```sql
39+
SELECT token(accountid)
40+
FROM uprofile.accounts
41+
WHERE token(accountid)=2976626013207263698;
42+
43+
name | accountid | state | country
44+
-------+-----------+-------+-------+
45+
Devon | 405 | NYC | USA |
3346

3447
```
3548

0 commit comments

Comments
 (0)