# Table Export

Export table data from the database to external storage.

---

## Overview

The Table Export feature enables you to export data from your organization's Suger database tables to various external storage destinations in multiple file formats. Whether you need a one-time export or recurring scheduled exports, this feature provides flexible options to meet your data extraction needs.

## Creating an Export Task

1. Navigate to **Settings** > **Table Export** tab
2. Click `New Task`
3. Configure the following settings:
   - **Name** *(optional)*: A descriptive name for your export task
   - **Source Table** *(required)*: Select the table to export
   - **Destination** *(required)*: Choose where to export the data (defaults to Download)
   - **Format** *(required)*: Select CSV, JSON, or PARQUET (defaults to CSV)
   - **Times** *(required)*: Choose between one-time or scheduled export
- For scheduled tasks: Configure the export interval
   - **Time Range** *(optional)*: Filter data by date range (defaults to last 30 days)

> <img src="/img/table-export.jpg" alt="New Table Export task configuration form" style="max-width:617px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />

## Export Types

### One-time Export
- Executes immediately after creation
- Ideal for ad-hoc data exports
- Export status can be monitored in the task list

### Scheduled Export
- Runs automatically based on configured schedule
- Supports recurring exports at regular intervals
- Can be manually triggered or cancelled as needed

## Export Formats

### CSV
- **Format**: Comma-separated values
- **Use Case**: Ideal for spreadsheet applications and data analysis
- **Features**:
  - Includes header row with column names
  - Standard UTF-8 encoding
  - Easy to import into Excel or Google Sheets

### JSON
- **Format**: JavaScript Object Notation
- **Use Case**: Perfect for data processing and system integration
- **Features**:
  - Maintains data types and structure
  - Human-readable format
  - Widely supported by programming languages and tools

### PARQUET
- **Format**: Columnar storage format
- **Use Case**: Optimized for big data analytics
- **Features**:
  - Efficient compression
  - Fast query performance
  - Preserves schema information

## Time-based Filtering

Filter your export data by selecting one of these predefined ranges:

| Time Range | Description |
|------------|-------------|
| Last 30 days | Data from the past month |
| Last 3 months | Previous quarter data |
| Last 6 months | Half-year of data |
| Last 1 year | Full year of data |
| Last 2 years | Two years of historical data |
| All | Complete dataset without time restriction |

## Export Destinations

### Direct Download
- Exports to Suger's secure AWS S3 bucket
- Provides a downloadable URL for accessing the exported file
- Secure and temporary access links

### Snowflake Integration

> **Important**: Prerequisites
>
> You must have Snowflake Integration configured before using this destination. See [Snowflake Integration](/integrations/snowflake) for setup instructions.

#### Configuration Steps:
1. Select Warehouse
2. Select Database
3. Select Schema

> **Note**: A new table will be created automatically to store the exported data. If a table with the same name exists, it will be dropped and recreated.


### Task management
### Viewing Tasks
- Access all export tasks from the Table Export dashboard
- Filter tasks by status (Active, Running, Failed, etc.)

### Managing Scheduled Tasks
You can perform these actions on scheduled tasks:

1. **Start**
   - Manually trigger an immediate export
   - Useful for testing or urgent data needs

2. **Cancel**
   - Disable the scheduled task
   - Prevents future automatic executions
   - Cannot be re-enabled
