You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by "Flaherty, Frank" <Fr...@pega.com> on 2016/02/04 18:45:44 UTC
Spark Cassandra Atomic Inserts
Cassandra provides "BEGIN BATCH" and "APPLY BATCH" to perform atomic execution of multiple statements as below:
BEGIN BATCH
INSERT INTO "user_status_updates"
("username", "id", "body")
VALUES(
'dave',
16e2f240-2afa-11e4-8069-5f98e903bf02,
'dave update 4'
);
INSERT INTO "home_status_updates" (
"timeline_username",
"status_update_id",
"status_update_username",
"body")
VALUES (
'alice',
16e2f240-2afa-11e4-8069-5f98e903bf02,
'dave',
'dave update 4'
);
APPLY BATCH;
Is there a way to do multiple Cassandra inserts atomically using the Cassandra Connector from Spark?
Thanks,
Frank
Frank Flaherty | Applications Operations Lead | Pegasystems Inc.
One Rogers Street, Cambridge, MA 02142
Office: 617.866.6843 | Email: frank.flaherty@pega.com<ma...@pega.com> | www.pega.com<http://www.pega.com/>
[cid:image001.jpg@01D0547C.D8E182C0]<http://www.pega.com/pega-can> PegaCan | Evolve Your CRM | www.pega.com/PegaCan<http://www.pega.com/PegaCan>
[cid:image002.png@01D0547C.D8E182C0]<https://www.twitter.com/pega> [cid:image003.png@01D0547C.D8E182C0] <https://www.facebook.com/pegasystems> [cid:image004.png@01D0547C.D8E182C0] <http://www.youtube.com/user/Pegasystems> [cid:image005.png@01D0547C.D8E182C0] <http://www.linkedin.com/company/pegasystems> PegaWORLD 2015 | June 7-9, 2015 | Orlando, FL | www.pegaworld2015.com<http://www.cvent.com/events/pegaworld-2015/event-summary-396380327f3e4ef591615a8e88f9a9e0.aspx>