How to import data, create base, views, use functions in Airtable

7/25/20235 min read

This is a part 1 of the series of Blog Post on how to import, create base, views, use functions and finally use the data in Airtable.

To import data into Airtable from a CSV file, you can follow these steps:

1. Prepare your CSV file: Ensure your CSV file contains the data you want to import into Airtable. Each column in the CSV file should correspond to a field in your Airtable table.

We will be using the data from Kaggle.com. The link for the data to be imported is as below:

https://www.kaggle.com/datasets/kyanyoga/sample-sales-data

I have created 3 csv files from the above source which will be quite useful when we are creating linked records in part 2 of the series on Airtable. We can import them into the bases in the Airtable. The three csv files are:

- Sales Data (2823 Rows) - Click on the link to download Sales Data

- Customer Data (92 Rows) - Click on the link to download Customer Data

- Contact Data (92 Rows) - Click on the link to download Contact Data

You can see from the data that Sales data has 1 to many relationship with Customer and Contact Data whereas the Customer Data has 1 to 1 relationship with the contact data. We will explore into 1:n and 1:1 relationship more when we discuss the linked records in part 2.

Key columns play a crucial role in database management, facilitating efficient data retrieval and enabling seamless data integration through table joins. In the context of Sales Data, Customer Data, and Contact Data tables, key columns act as unique identifiers for records, ensuring accurate and meaningful associations between the tables.

The Sales Data table contains transactional information, such as order details, sales dates, and item quantities. To gain valuable insights, this table often includes a primary key like " ORDERNUMBER." The Customer Data table stores customer information, including names, addresses, and contact details, with a primary key such as " CUSTOMERNAME." Similarly, the Contact Data table holds various communication details for customers, like email addresses and phone numbers, with a primary key "Contact ID."

By using key columns, these tables can be efficiently joined to create a comprehensive dataset. For instance, by linking the Customer Data table's "Customer ID" with the Sales Data table's "Customer ID," businesses can gain visibility into customers' purchase behavior and preferences. Additionally, joining the Sales Data table with the Contact Data table on "Customer ID" facilitates targeted marketing campaigns, as it merges relevant communication information with transactional data.

2. Login to Airtable: Go to the Airtable website (https://airtable.com/) and log in to your account.

3. Create a Base: If you haven't already, create a base in Airtable where you want to import the data. A base is like a database or spreadsheet that contains tables to store your data.

4. Open the Table: Open the table in your Airtable base where you want to import the data. If you haven't created the table yet, you can create one by clicking on the "+ Add a table" button.

5. Import Data: a. Click on the "+" button (Add a record) located on the left side of the table. b. From the drop-down menu, select "Import a spreadsheet."

6. Upload the CSV file: Click on the "Choose file" button and select the CSV file from your local computer that you want to import.

7. Map Fields: Airtable will automatically try to match the fields in your CSV file with the fields in your Airtable table. Review the field mapping to ensure the data is aligned correctly. Also ensure that data types of the fields are correctly chosen.

In this dataset, you should change the data types of the below columns as follows:

Sales Data’s Field Data Types are:

ORDERNUMBER Number

ORDERLINENUMBER Number

PRODUCTCODE Single Select

CUSTOMERNAME Single Line Text

DEALSIZE Single Select

PRODUCTLINE Single Select

QTR_ID Number

MONTH_ID Number

YEAR_ID Number

MSRP Currency

QUANTITYORDERED Number

SALES Currency

ORDERDATE Date

STATUS Single Select

Customer Data’s Field Data Types are:

CUSTOMERNAME Single Line Text

PHONE Phone Number

ADDRESSLINE1 Single Line Text

ADDRESSLINE2 Single Line Text

CITY Single Line Text

POSTALCODE Single Line Text

COUNTRY Single Select

TERRITORY Single Select

Contact Data’s Field Data Types are:

ContactId Number

CUSTOMERNAME Single Line Text

CONTACTLASTNAME Single Line Text

CONTACTFIRSTNAME Single Line Text

8. Import the Data: Once you have reviewed and confirmed the field mapping, click on the "Import" button to start the data import process.

9. Verify Data: After the import is complete, review your table to verify that the data has been imported correctly. If there are any issues, you can manually make adjustments in Airtable. Please note that during the import process, Airtable will try to convert the data in your CSV file to match the appropriate data types in your table. However, it's essential to double-check the imported data for accuracy.

Additionally, Airtable allows you to update existing records using the "Update matching records" option during the import process. This is helpful if you want to update existing data based on unique identifiers like record IDs or primary keys.

Remember to follow Airtable's guidelines and documentation for importing data, as the platform might introduce changes or improvements over time. Creating bases and tables in Airtable is a straightforward and intuitive process. With its user-friendly interface, users can effortlessly design and customize their own databases to suit their specific needs.

The flexibility of Airtable allows for easy organization and categorization of data, making it convenient to create and manage multiple tables within a single base. Additionally, the extensive range of field types available ensures that data can be represented accurately and efficiently. From simple text fields to more complex formulas and attachments, Airtable provides a comprehensive set of tools for data entry and manipulation.

Furthermore, the collaborative features enable seamless teamwork and collaboration, allowing multiple users to work on the same base simultaneously. Overall, Airtable proves to be a powerful and versatile tool for creating and managing bases and tables, simplifying data organization and enhancing productivity.

In part 2 of this series on Airtable, we would be looking at Linked records and going into how we can relate these tables with each other.