Xano Documentation
  • 👋Welcome to Xano!
  • 🌟Frequently Asked Questions
  • 🔐Security & Compliance (Trust Center)
  • 🙏Feature Requests
  • 💔Known Issues
  • Before You Begin
    • Using These Docs
    • Where should I start?
    • Set Up a Free Xano Account
    • Key Concepts
    • The Development Life Cycle
    • Navigating Xano
    • Plans & Pricing
  • The Database
    • Designing your Database
    • Database Basics
      • Using the Xano Database
      • Field Types
      • Relationships
      • Database Views
      • Export and Sharing
      • Data Sources
    • Migrating your Data
      • Airtable to Xano
      • Supabase to Xano
      • CSV Import & Export
    • Database Performance and Maintenance
      • Storage
      • Indexing
      • Maintenance
      • Schema Versioning
  • 🛠️The Function Stack
    • Building with Visual Development
      • APIs
        • Swagger (OpenAPI Documentation)
      • Custom Functions
        • Async Functions
      • Background Tasks
      • Triggers
      • Middleware
      • Configuring Expressions
      • Working with Data
    • Functions
      • AI Tools
      • Database Requests
        • Query All Records
          • External Filtering Examples
        • Get Record
        • Add Record
        • Edit Record
        • Add or Edit Record
        • Patch Record
        • Delete Record
        • Bulk Operations
        • Database Transaction
        • External Database Query
        • Direct Database Query
        • Get Database Schema
      • Data Manipulation
        • Create Variable
        • Update Variable
        • Conditional
        • Switch
        • Loops
        • Math
        • Arrays
        • Objects
        • Text
      • Security
      • APIs & Lambdas
        • Realtime Functions
        • External API Request
        • Lambda Functions
      • Data Caching (Redis)
      • Custom Functions
      • Utility Functions
      • File Storage
      • Cloud Services
    • Filters
      • Manipulation
      • Math
      • Timestamp
      • Text
      • Array
      • Transform
      • Conversion
      • Comparison
      • Security
    • Data Types
      • Text
      • Expression
      • Array
      • Object
      • Integer
      • Decimal
      • Boolean
      • Timestamp
      • Null
    • Environment Variables
    • Additional Features
      • Response Caching
  • Testing and Debugging
    • Testing and Debugging Function Stacks
    • Unit Tests
    • Test Suites
  • CI/CD
  • File Storage
    • File Storage in Xano
    • Private File Storage
  • Realtime
    • Realtime in Xano
    • Channel Permissions
    • Realtime in Webflow
  • Maintenance, Monitoring, and Logging
    • Statement Explorer
    • Request History
    • Instance Dashboard
      • Memory Usage
  • Building Backend Features
    • User Authentication & User Data
      • Separating User Data
      • Restricting Access (RBAC)
      • OAuth (SSO)
    • Webhooks
    • Messaging
    • Emails
    • Custom Report Generation
    • Fuzzy Search
    • Chatbots
  • Xano Features
    • Snippets
    • Instance Settings
      • Release Track Preferences
      • Static IP (Outgoing)
      • Change Server Region
      • Direct Database Connector
      • Backup and Restore
      • Security Policy
    • Advanced Back-end Features
      • Xano Link
      • Developer API (Deprecated)
    • Metadata API
      • Master Metadata API
      • Tables and Schema
      • Content
      • Search
      • File
      • Request History
      • Workspace Import and Export
      • Token Scopes Reference
  • Xano AI
    • Building a Backend Using AI
    • Get Started Assistant
    • AI Database Assistant
    • AI Lambda Assistant
    • AI SQL Assistant
    • API Request Assistant
    • Template Engine
    • Streaming APIs
  • AI Tools
    • MCP Servers
      • Connecting Clients
      • MCP Functions
  • Xano Transform
    • Using Xano Transform
  • Xano Actions
    • What are Actions?
    • Browse Actions
  • Team Collaboration
    • Realtime Collaboration
    • Managing Team Members
    • Branching & Merging
    • Role-based Access Control (RBAC)
  • Agencies
    • Xano for Agencies
    • Agency Features
      • Agency Dashboard
      • Client Invite
      • Transfer Ownership
      • Agency Profile
      • Commission
      • Private Marketplace
  • Enterprise
    • Xano for Enterprise
    • Enterprise Features
      • Microservices
      • Tenant Center
      • Compliance Center
      • Security Policy
      • Instance Activity
      • Deployment
      • RBAC (Role-based Access Control)
      • Xano Link
  • Your Xano Account
    • Account Page
    • Billing
    • Referrals & Commissions
  • Troubleshooting & Support
    • Error Reference
    • Troubleshooting Performance
      • When a single workflow feels slow
      • When everything feels slow
      • RAM Usage
      • Function Stack Performance
    • Getting Help
      • Granting Access
      • Community Code of Conduct
      • Community Content Modification Policy
  • Special Pricing
    • Students & Education
    • Non-Profits
  • Security
    • Best Practices
Powered by GitBook
On this page
  • Importing a CSV
  • Add a New Table
  • Add to an Existing Table
  • Edit Records in an Existing Table
  • Valid CSV Format

Was this helpful?

  1. The Database
  2. Migrating your Data

CSV Import & Export

Last updated 25 days ago

Was this helpful?

Importing a CSV

Xano's CSV file import is ultra-robust. Import your file with confidence, even if you have millions of records. The import process runs on Xano's special import service, which has dedicated resources separate from your instance, so it can handle all of your data no matter how large it is.

The CSV file import allows you to create a brand new table from scratch and will generate the schema automatically.

Additionally, you can edit existing records if the file can be mapped to a primary key or append data to an existing table.

Uploads of over 5,000 records will be performed in the background. You can easily monitor the import's progress in the settings of your workspace and will be notified on Xano and via email when the import is complete.

Add a New Table

From the database select Add Table.

When the right panel opens up, select Import Data and choose the CSV file option.

Next, drag and drop a CSV file onto the uploader or browse the files on your computer for the file you wish to upload.

Once you select a CSV file, the preview of your CSV will open up. The preview will display the first 100 rows of your file. You can make any final adjustments here before uploading the file to Xano.

Choose a table name

Set a field as the Primary Key

Xano will try to automatically detect a primary key field. Currently, only integers are supported for the primary key field. The drop-down will show any fields compatible to be a primary key. If there is no primary key, then Xano will create the primary key automatically.

Make any changes

Lastly, you can select a column to change its data type, disable it (if you do not want it included in the upload), or re-order the column's position.

Upload and finish!

Once you are ready select upload! If you are uploading over 5,000 records then your upload will be performed in the background. You can monitor the progress of your upload from the settings page of your workspace. Once your background upload is complete a green banner will appear notifying you to refresh your browser and an email notification will be sent with confirmation of a successful import.

Add to an Existing Table

Choose the table you want to add data to via a CSV, select the menu icon in the top-right, and select CSV Import.

Drag and drop a CSV file onto the uploader or choose a file from your computer.

Next, a preview of your CSV will appear. The first 100 records will be displayed. Review the mapped columns before selecting upload. Any column headers in green will show automatically detected mapped fields. To make a change, select a column and choose a different column to map to. You can also select create a new column if you need to create new schema for the table.

Hit upload and finish!

Edit Records in an Existing Table

To edit an existing record the CSV file must have a primary key. The primary key will be mapped to the primary key of the existing records to make the updates. Currently, only integers are supported for the primary key field.

If there is no primary key to map to the existing id field the CSV file will add new records to the table.

Be sure to review the column mappings before uploading. Xano will search for a column in the file called ID. However, double check this field. If your ID field is called something else, click on the column and choose to map the column to the existing ID field.

You can make changes to any of the columns mapping's by clicking on the column header. Green will show a compatible mapping to a field. Any red headers indicate an unmapped column. Finally, you can also select create the column if you need to create a new column on the table.

Valid CSV Format

It's important that you use a valid CSV file format in order to successfully import your data. If there is an issue with initiating the upload then this could likely be the issue.

What is a valid CSV file format?

A CSV stands for a comma-separate file, which is a delimited text file that uses a comma to separate values. The importer does not support other separators, such as semicolons. Each line of the file is a data record. Each record consists of one or more fields, separated by commas.

  • The first row must contain the column names - not the file name or any other data.

  • The second row begins the values. They should be in the same order as the columns they belong to.

  • Each row should have the same amount of values as there are columns.

  • Enclosure characters are required when working with text strings that contain quotation marks. This is because if a quotation mark is detected, this is typically something that would mark the beginning or end of a value. You can use a double quote ("") to dictate if a value should contain this quotation mark somewhere inside the value.

  • CSV files should be UTF-8 encoded. If you're having trouble importing your CSV properly in Xano and have determined you are using both the proper separator and enclosure characters, please make sure your file us UTF-8 encoded. This ensures that there are no special characters that might not be supported in Xano.

UTF-8 Encoding in Notepad (Windows)
  1. Open your file in Notepad.

  2. Click File > Save As...

  3. Click "Save As Type", and choose All Files.

  4. Click "UTF-8" in the Encoding dropdown.

  5. Save the file.

UTF-8 Encoding in Google Sheets (All platforms)
  1. Open your file in Google Sheets

  2. Click File > Download > Comma separated values (CSV)

  3. The file will be downloaded in CSV format using UTF-8 encoding.

UTF-8 Encoding in Numbers (Mac)
  1. Open your file in Numbers

  2. Click File > Export To... > CSV

  3. In the "Text Encoding" dropdown, choose UTF-8

  4. Save the file.

How can I check my CSV file format?

You can review the format of your CSV file format in a number of ways. Open the file in Text Editor, Visual Studio Code, or another code editor. You can also do an online search for CSV file format validators and use an online service.

How can I edit my CSV file format?

Tools like Text Editor, Visual Studio Code, and other code editors allow you to make any necessary edits to your file and save the changes. When opening the file from your computer, right click and choose open with to choose from the different options available on your computer.

160B
Xano-Sample-CSV.csv
Here is a sample CSV file demonstrating both the proper separator and enclosure characters.
Select Add Table and Select Import Data.
Select import data from CSV.

Export a Table or View

You will receive an email once your export is complete.

Export Specific Records

Your export may take a few moments depending on the size, but should download automatically.

Click the icon and choose Export CSV from the dropdown menu.

Check the option to export only the currently selected .

Check the box next to the records you want to export and click the button.

database view