> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/articles-1/data/working-with-date-patterns.md).

# Working with Date Patterns

Before you create your landing zone where raw data will be staged for Upsolver to ingest, you need to be aware of a couple of things:

1. Date values should be lexicographically ordered and include a leading zero when applicable. For example, use `/2022/02/04` for February 4th 2022, over `/22/2/4`.
2. Avoid including a dynamically changing prefix, like application ID or job cluster ID, as the first part of your prefix. If you need to include it, add it at the end. For example, use `/2022/02/04/X34TFA2` instead of `/X34TFA2/2022/02/04`.

To ingest date-partitioned Amazon S3 data, you can configure the [`DATE_PATTERN`](broken://spaces/WKMq8oT1OPM3KjP8vlg2/pages/WMhAXnGlAoluCnkhr3Mc#date_pattern) property of your ingestion job. For Apache Hive partitions, the value is prefixed with a keyword representing its meaning, for example, `/year=2022/month=02/day=04/`. To support this format, you include the prefixes in the `DATE_PATTERN` property surrounded by two single quotes (not a double quote).&#x20;

Using the above example, the `DATE_PATTERN` will be <mark style="color:red;">`’`</mark><mark style="color:green;">`’’year=’’`</mark>`yyyy`<mark style="color:green;">`’’/month=’’`</mark>`MM`<mark style="color:green;">`’’/day=’’`</mark>`dd`<mark style="color:red;">`’`</mark>. As you can see, the string literals in the pattern, like `‘’year=’’` and `‘’month=’’` are wrapped in two single quote characters, not double quotes.&#x20;

If there is a single quote in your folder path that needs to be represented in the path literal, you need to surround it with two single quotes. For example, `year(‘0’)=2000` would be represented as `’’’year(’’’’0’’’’)=’’yyyy/’`. This could be confusing, so ensure you’re quoting the string literal parts of the pattern and not the date value patterns.

{% hint style="info" %}
Note that when there is no date pattern defined, you cannot specify a time to start ingestion; all available data is ingested by default.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://upsolver.gitbook.io/content/articles-1/data/working-with-date-patterns.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
