> 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/column-case-sensitivity.md).

# Column Case Sensitivity

Upsolver offers a consistent methodology for managing case sensitivity in column names during SQL query execution. Understanding its approach is crucial for precise and efficient data operations. This guide details Upsolver's handling of case sensitivity and how column names are mapped across various target systems in `SELECT` queries.

#### Column Case Insensitivity in Upsolver

Upsolver views column names without considering their case. In other words, it doesn't matter if column names are in upper, lower, or mixed case; Upsolver sees them all as the same when executing queries.

#### Retaining Original Column Case in SELECT Queries

While Upsolver strives to maintain the original case of column names, its behavior might differ based on the target system in question. Below is a breakdown of how Upsolver retains the original case in a `SELECT` query across different systems:

**Mapping of Column Names by Target System**

<table><thead><tr><th>Target System</th><th>Top-Level Columns</th><th width="206">Variant / Struct fields</th></tr></thead><tbody><tr><td>Snowflake</td><td>Uppercase</td><td>Original Case</td></tr><tr><td>Athena</td><td>Lowercase</td><td>Lowercase</td></tr><tr><td>Other</td><td>Original Case</td><td>Original Case</td></tr></tbody></table>

**Examples of Mapping Column Names for SELECT \***

Let's illustrate how Upsolver maps column names when performing a `SELECT *` query for various target systems:

Suppose we have the following table structure with original case column names: **CustomerID**, **OrderDate**, **BillingAmount**, and a nested column named **CustomerAddress** with two sub-fields.

{% code fullWidth="false" %}

```markdown
| CustomerID | OrderDate   | BillingAmount | CustomerAddress             |
|------------|-------------|---------------|-----------------------------|
| 101        | 2023-01-15  | 150.00        | { "Line1": "123 Main St",   |
|            |             |               |   "Line2": "Apt 4B" }       |
| 102        | 2023-02-10  | 200.00        | { "Line1": "456 Elm Rd",    |
|            |             |               |   "Line2": "Suite 200" }    |
```

{% endcode %}

Here's how the column names map for different source fields and target systems:

<table data-full-width="true"><thead><tr><th>Source Field</th><th width="256.5">Snowflake</th><th width="214">Athena</th><th>Other</th></tr></thead><tbody><tr><td>CustomerID</td><td>CUSTOMERID</td><td>customerid</td><td>CustomerID</td></tr><tr><td>OrderDate</td><td>ORDERDATE</td><td>orderdate</td><td>OrderDate</td></tr><tr><td>BillingAmount</td><td>BILLINGAMOUNT</td><td>billingamount</td><td>BillingAmount</td></tr><tr><td>CustomerAddress</td><td>CUSTOMERADDRESS</td><td>customeraddress</td><td>CustomerAddress</td></tr><tr><td>CustomerAddress.Line1</td><td>CUSTOMERADDRESS.Line1</td><td>customeraddress.line1</td><td>CustomerAddress.Line1</td></tr><tr><td>CustomerAddress.Line2</td><td>CUSTOMERADDRESS.Line2</td><td>customeraddress.line2</td><td>CustomerAddress.Line2</td></tr></tbody></table>

**Known Limitations**

Jobs created prior to Upsolver version **2023.05.15-02.23** will not adhere to the rules outlined above. In these cases, all columns will be converted to lowercase for all target systems except Snowflake, where the column names will be converted to uppercase.


---

# 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/column-case-sensitivity.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.
