# S3 Sink Has No Prefix Value

**URL:** <https://ask.lenses.io/t/s3-sink-has-no-prefix-value/200>\
**Category:** General\
**Tags:** kafka-connect\
**Created:** [March 28, 2024, 7:23pm UTC](https://ask.lenses.io/t/s3-sink-has-no-prefix-value/200 "2024-03-28T19:23:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwoodruff](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/cwoodruff/32/111_2.png) [@cwoodruff](https://ask.lenses.io/u/cwoodruff)\
**Post date:** [March 28, 2024, 7:23pm UTC](https://ask.lenses.io/t/s3-sink-has-no-prefix-value/200/1 "2024-03-28T19:23:44Z")

</div>

Documentation at the link below the default partitioning for an S3 bucket is:

_bucket/prefix/topic/partition/_

My data was backed up to S3 without a prefix so files were stored in:

_bucket/topic/partition_

How do you show there is no prefix value when configuring the S3 source connector to restore data?

Documentation shows the kcql statement for data restoral is

_insert into $TOPIC\_NAME select \* from $BUCKET\_NAME:$PREFIX\_NAME STOREAS `Avro`_

I used the following statement and received errors:

_insert into $TOPIC\_NAME select \* from $BUCKET\_NAME STOREAS `Avro`_

**Reference**

> **[Kafka to AWS S3 | S3 open source Kafka connector | Lenses.io Docs](https://docs.lenses.io/4.3/integrations/connectors/stream-reactor/sinks/s3sinkconnector/#s3-bucket-layout)**
>
> A Kafka Connect sink connector for writing records from Kafka to AWS S3 buckets

---

<div class="post-metadata">

**Author:** ![stheppi](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/stheppi/32/30_2.png) [@stheppi](https://ask.lenses.io/u/stheppi)\
**Post date:** [April 4, 2024, 8:47am UTC](https://ask.lenses.io/t/s3-sink-has-no-prefix-value/200/2 "2024-04-04T08:47:54Z")

</div>

Hi cwoodruff,

The source requires the full path to where the topic was backed-up.  
Considering the topic was stored in bucket/topic then the source connector KCQL should be:

```auto
insert into $TOPIC_NAME select * from bucket:topic STOREAS `Avro`

```

Best,  
Stefan
