# Kapacitor UDF Python, Tags are ignored

**URL:** <https://community.influxdata.com/t/kapacitor-udf-python-tags-are-ignored/16801>\
**Category:** Systems\
**Created:** [November 18, 2020, 1:14pm UTC](https://community.influxdata.com/t/kapacitor-udf-python-tags-are-ignored/16801 "2020-11-18T13:14:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christoph1](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@Christoph1](https://community.influxdata.com/u/Christoph1)\
**Post date:** [November 18, 2020, 1:14pm UTC](https://community.influxdata.com/t/kapacitor-udf-python-tags-are-ignored/16801/1 "2020-11-18T13:14:14Z")

</div>

Hi,  
I have copied and modified a udf python sample that copies points from one database into another.  
However, the tags are stored as fields.

How can I keep the tags.

UDF:

def point(self, point):  
response = udf\_pb2.Response()  
response.point.CopyFrom(point)  
…

Tick:  
batch  
|query(‘select \* from out.here’)  
.every(30s)  
.period(365d)  
@polynomial()  
|influxDBOut()  
.database(‘in’)  
.measurement(‘there’)

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [November 24, 2020, 9:29pm UTC](https://community.influxdata.com/t/kapacitor-udf-python-tags-are-ignored/16801/2 "2020-11-24T21:29:52Z")

</div>

Hello @Christoph1,  
can you use the .tag() with the default node?

> **[DefaultNode | Kapacitor 1.6 Documentation](https://docs.influxdata.com/kapacitor/v1.5/nodes/default_node/)**
>
> DefaultNode sets defaults of fields and tags on data points.

```auto
  // Write the transformed data to InfluxDB
  |influxDBOut()
    .database('mydb')
    .retentionPolicy('myrp')
    .measurement('errors')
    .tag('kapacitor', 'true')
    .tag('version', '0.2')
```

---

<div class="post-metadata">

**Author:** ![Christoph1](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@Christoph1](https://community.influxdata.com/u/Christoph1)\
**Post date:** [November 25, 2020, 5:59am UTC](https://community.influxdata.com/t/kapacitor-udf-python-tags-are-ignored/16801/3 "2020-11-25T05:59:36Z")

</div>

Hi, thank you for your reply.

I do not understand the benefit. Where would I define the default and why.

Best Regards
