# Write data from PEGA CDH to Cassandra DB

**URL:** <https://forums.pega.com/t/write-data-from-pega-cdh-to-cassandra-db/7865>\
**Category:** General\
**Tags:** 8-8-5, data-integration, data-management, pega-platform\
**Created:** [July 23, 2024, 6:55am UTC](https://forums.pega.com/t/write-data-from-pega-cdh-to-cassandra-db/7865 "2024-07-23T06:55:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LidiaE16779530](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@LidiaE16779530](https://forums.pega.com/u/LidiaE16779530)\
**Post date:** [July 23, 2024, 6:55am UTC](https://forums.pega.com/t/write-data-from-pega-cdh-to-cassandra-db/7865/1 "2024-07-23T06:55:35Z")

</div>

As per my understanding from PEGA Academy, I can write into Cassandra database in 2 ways:

1. into a file (using a file template)

2. into a table

Question: When to use the writing into a Cassandra file and when to use the writing into a Cassandra table ?

I need your answer asap, please.

Thank you!

---

<div class="post-metadata">

**Author:** ![MarijeSchillern](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/marijeschillern/32/23321_2.png) [@MarijeSchillern](https://forums.pega.com/u/MarijeSchillern)\
**Post date:** [August 8, 2024, 5:19pm UTC](https://forums.pega.com/t/write-data-from-pega-cdh-to-cassandra-db/7865/2 "2024-08-08T17:19:17Z")

</div>

@LidiaE16779530 Use writing into a Cassandra table for frequent read/write operations and structured data. Use writing into a Cassandra file for bulk data operations, backups, and archival purposes.

⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references

[Connecting to an external Cassandra database through a Database Table data](https://docs.pega.com/bundle/platform/page/platform/decision-management/connect-cassandra-database-data-set.html)

[how to insert data into cassandra DB by using pega](https://support.pega.com/question/how-insert-data-cassandra-db-using-pega)

[Is Cassandra data required as part of the data migration?](https://support.pega.com/question/cassandra-data-required-part-data-migration)
