# Unit Test Data Flow with Kafka as Data Set

**URL:** <https://forums.pega.com/t/unit-test-data-flow-with-kafka-as-data-set/5417>\
**Category:** General\
**Tags:** other-industry, 8-7-2, 8-7-4, pega-academy, senior-system-architect, pega-platform, data-model\
**Created:** [November 16, 2023, 5:14am UTC](https://forums.pega.com/t/unit-test-data-flow-with-kafka-as-data-set/5417 "2023-11-16T05:14:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PoojaPalla](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/poojapalla/32/12434_2.png) [@PoojaPalla](https://forums.pega.com/u/PoojaPalla)\
**Post date:** [November 16, 2023, 5:14am UTC](https://forums.pega.com/t/unit-test-data-flow-with-kafka-as-data-set/5417/1 "2023-11-16T05:14:34Z")

</div>

Hi All,

We have a **DATAFLOW** - which consists of **DATASET(KAFKA)** and **activity** (which creates cases based on the values from payLoad)

When we tried to run the dataflow rule manually, **we faced a warning stating not authorized to access the Kafka topic.** How can we overcome this error?

Also, **how can we test a dataflow that has existing data in it** \*\*?\*\* (we tried DataFlow execute in activity, but not sure what values should be given for RunID or even the RunOptions selected)

---

<div class="post-metadata">

**Author:** ![SMIT\_PRAKASH](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/smit_prakash/32/3145_2.png) [@SMIT\_PRAKASH](https://forums.pega.com/u/SMIT_PRAKASH)\
**Post date:** [November 16, 2023, 6:32pm UTC](https://forums.pega.com/t/unit-test-data-flow-with-kafka-as-data-set/5417/2 "2023-11-16T18:32:51Z")

</div>

@PoojaPalla - First please check if you write access to the topic so that so can drop message to the topic via activity.
