Skip to content

Commit 1104ca9

Browse files
committed
Added counter table example mapping
1 parent 1c3486a commit 1104ca9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/resources/cdm.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ spark.batchSize 10
7474
#spark.counterTable.cql
7575
#spark.counterTable.cql.index 0
7676

77+
############################### EXAMPLE MAPPING USING A DEMO counter column TABLE ###########################
78+
# CREATE TABLE cycling.cyclist_count (
79+
# pk1 uuid,
80+
# pk2 date,
81+
# cc1 boolean,
82+
# c1 counter,
83+
# PRIMARY KEY((pk1,pk2),cc1)
84+
# );
85+
# then, our counter table mapping would look like below,
86+
# spark.counterTable true
87+
# spark.counterTable.cql UPDATE cycling.cyclist_count SET c1 += ? WHERE pk1 = ? AND pk2 = ? AND cc1 = ?
88+
# spark.counterTable.cql.index 3,0,1,2
89+
#
90+
# Remember the above count index order is based on the below column mapping ordering,
91+
# spark.query.origin pk1,pk2,cc1,c
92+
#############################################################################################################
93+
7794
# ENABLE ONLY IF YOU WANT TO FILTER BASED ON WRITE-TIME (values must be in microseconds)
7895
#spark.origin.writeTimeStampFilter false
7996
#spark.origin.minWriteTimeStampFilter 0

0 commit comments

Comments
 (0)