> For the complete documentation index, see [llms.txt](https://cqube.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cqube.sunbird.org/cqube-v-4.1-beta/design-principles.md).

# S3 Partitioning

## S3 bucket partitioning

S3 buckets will contain partitions for the data files to store. The partitions are created at the S3 input bucket & the S3 Output bucket.&#x20;

### S3 emission bucket partitions

* All the files in the S3 emission bucket will be in the CSV format.
* S3 emission bucket follows the folder hierarchy based on the data sources.&#x20;

```
S3 -> Bucket name -> Data source -> emitted zip files with timestamp
```

* The emitted zip file contains the CSV data files with timestamp and a manifest file with a timestamp.
* The folders and the files will be removed from the S3 emission bucket once NIFI copies the data.
* Unprocessed data files will remain in the S3 emission bucket  for one week and then they will be deleted automatically at the end of the week.

### S3 input bucket partitions

* All the files in the S3 input bucket will be in the CSV format.
* S3 input bucket follows a hierarchical partitioning based on the Data source, Year, Month, date and timestamp

```
S3 -> Bucket name -> Data source -> Year -> Year - Month -> date_Source name
```

Example for the S3 input bucket:

```
S3/cqube-gj-input/student_attendance/2020/2020-05/2020-05-29_student_attendance
```

### &#x20;S3 output bucket partitions

* All the files in the S3 Output bucket will be in the JSON format.
* S3 output bucket follows the hierarchical partitioning based on the data source, Year, Month, date and timestamp, similar to the partitioning that the S3 input bucket follows.
* Metadata files will have information of the latest updated output files which helps cQube to consider the latest output file during the visualization stage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cqube.sunbird.org/cqube-v-4.1-beta/design-principles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
