# Lenses ADLS Sink Connector - timestamp partitioning problem

**URL:** <https://ask.lenses.io/t/lenses-adls-sink-connector-timestamp-partitioning-problem/350>\
**Category:** Apache Kafka Connectors\
**Tags:** kafka-connect\
**Created:** [April 7, 2025, 5:46pm UTC](https://ask.lenses.io/t/lenses-adls-sink-connector-timestamp-partitioning-problem/350 "2025-04-07T17:46:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![J-Harmson](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/j-harmson/32/170_2.png) [@J-Harmson](https://ask.lenses.io/u/J-Harmson)\
**Post date:** [April 7, 2025, 5:46pm UTC](https://ask.lenses.io/t/lenses-adls-sink-connector-timestamp-partitioning-problem/350/1 "2025-04-07T17:46:22Z")

</div>

Hello!

I am relatively new to Kafka Connect and Stream Reactor/Lenses and I’m trying to get the adls sink connector to work. I am trying to follow the documentation and the files are writing correctly, but the PARTITIONBY doesn’t appear to be working properly, instead of splitting the directory structure into yyyy/MM/dd/HH it is writing it like: source\_ts\_ms=1744042084001/file.json (source\_ts\_ms being a field in a Debezium messages’ payload - a datatype of int-64).

I think this is because it is falling back to the long format as it can’t convert it to a timestamp. I’ve tried using wallclock too but get something similar or something like event\_timestamp=[missing].

Can anyone inform me on what I’m doing wrong? I can send the configuration if needed. Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![J-Harmson](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/j-harmson/32/170_2.png) [@J-Harmson](https://ask.lenses.io/u/J-Harmson)\
**Post date:** [April 10, 2025, 8:19am UTC](https://ask.lenses.io/t/lenses-adls-sink-connector-timestamp-partitioning-problem/350/2 "2025-04-10T08:19:21Z")

</div>

For anyone else having this issue, I solved it using the InsertRecordTimestampHeaders SMT located here: [kafka-connect-smt/InsertRecordTimestampHeaders.md at main · lensesio/kafka-connect-smt](https://github.com/lensesio/kafka-connect-smt/blob/main/InsertRecordTimestampHeaders.md).

“transforms.Ts.type”:“io.lenses.connect.smt.header.InsertRecordTimestampHeaders”,  
“transforms.ts.timezone”: “Europe/London”,  
“transforms.Ts.year.format”:“yyyy”,  
“transforms.Ts.month.format”:“MM”,  
“transforms.Ts.day.format”:“dd”,  
“transforms.Ts.hour.format”:“HH”

PARTITIONBY \_header.year, \_header.month, \_header.day in the KCQL

---

<div class="post-metadata">

**Author:** ![guillaume.ayme](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/guillaume.ayme/32/64_2.png) [@guillaume.ayme](https://ask.lenses.io/u/guillaume.ayme)\
**Post date:** [April 10, 2025, 10:45am UTC](https://ask.lenses.io/t/lenses-adls-sink-connector-timestamp-partitioning-problem/350/3 "2025-04-10T10:45:49Z")

</div>

Thanks for sharing this @J-Harmson !
