# Custom Calendars for Live Connections

Tellius supports **Custom Fiscal Calendars** at the datasource level, making them fully compatible with live-mode querying for **Snowflake, Redshift, BigQuery,** and **Spark SQL.**

When configuring your **Snowflake, Redshift, BigQuery,** and **Spark SQL** connection to view and manage available fiscal or custom calendar options. Under **Data → Connect → Custom Calendars**, you'll see a list of predefined calendars (e.g., ISO 8601, Gregorian, Q3 format, Fiscal Calendar).&#x20;

Tellius stores custom calendar data in table format within the live data source, enabling accurate filtering and joins directly in your warehouse. This new configuration flow makes it easy for users—especially data owners—to apply fiscal calendars without any dependency. You can:

* **Create**: If you have write access, Tellius will generate and save a new calendar table directly into your data source.
* **Map**: If your calendar table already exists (manually created or loaded from CSV), simply point Tellius to it—no write access required.
* **Upload from CSV**: Download a ready-made CSV template, populate it with your fiscal logic, and load it into your database to use with the **Map** option.

<figure><img src="https://content.gitbook.com/content/VXyBWnsg0T2tHBl87viA/blobs/J8JU6qv74LiiBNnqNde0/image.png" alt="" width="563"><figcaption><p>Custom Calendars in live mode</p></figcaption></figure>

Click on the three dot menu to configure your custom calendar in three ways:

### **1. Create New Calendar Table**

* Automatically generates a new calendar table in your connected database.
* Tellius creates a table with the expected structure (dates, fiscal weeks/months/years).
* You must have **write access** to the selected database. Use this option if you don’t already have a calendar table.
* Once created and populated, Tellius will automatically link the calendar if you have write access.
* If you don’t have write access, you’ll need to manually map the table using the **Map Existing Calendar Table** option.
* You’ll see the following message stating that a table will be created in your existing data location.

<figure><img src="https://content.gitbook.com/content/VXyBWnsg0T2tHBl87viA/blobs/HEDneCrouHtvzM0nYBEf/image.png" alt="" width="563"><figcaption><p>Creating new calendar table</p></figcaption></figure>

### **2. Map Existing Calendar Table**

If you don’t have write access to your data source—or you’ve already created a fiscal calendar table—use this option to link it directly in Tellius instead of building a new one.

#### **Prerequisites**

1. Go to **Settings → Application Settings → Time Configuration** and download the calendar CSV template.
2. Fill in your fiscal calendar details in the CSV file (e.g., fiscal year start, weeks, months).
3. Save this file as a table in your data warehouse (e.g., Snowflake, Redshift, BigQuery).

{% hint style="info" %}
Ensure the `date` column is of **timestamp** data type. This is required for accurate time-based filtering.
{% endhint %}

#### **Mapping the table in Tellius:**

1. Select the relevant **database**, **schema**, and **table** from dropdowns.
2. Click on **Map Table** to connect the table.
3. Tellius now knows where to look for your fiscal calendar logic.

<figure><img src="https://content.gitbook.com/content/VXyBWnsg0T2tHBl87viA/blobs/TTZrYvpLgDsi59HNhagK/image.png" alt="" width="375"><figcaption><p>Map existing calendar table</p></figcaption></figure>

### **3. Download CSV File for Calendar**

Clicking **"Download CSV File for Calendar"** directly downloads a pre-filled calendar table in CSV format. Useful if you prefer offline editing or want to migrate fiscal data from spreadsheets.

#### **After mapping or creating the calendar**

* If you create a new calendar table, the calendar will appear in the list with an **“Automatic”** tag, indicating it was Tellius-generated.
* If you map an existing calendar table, it will show up with a **“Manual”** tag, indicating it was linked manually to an existing dataset.

<figure><img src="https://content.gitbook.com/content/VXyBWnsg0T2tHBl87viA/blobs/JCvOt92vZx6ZvLR2BaW6/image.png" alt="" width="375"><figcaption><p>Custom Calendars</p></figcaption></figure>

* Calendars not yet configured will display a warning: *“This calendar needs to be configured before it can be used.”*
* If the calendar table becomes unavailable, Tellius will fall back to a standard ISO calendar.
