In this guide, we will use Airfold’s three core concepts: Ingest, Transform, and Publish. We’ll process web events data to extract top referrers using the sample web events CSV file. Our steps include:
  • Creating a workspace
  • Uploading a CSV file
  • Writing queries as features
  • Exposing the features through an API

Create a Workspace

We start by creating a new workspace. If this is your first time using Airfold, you will be directed to our welcome page where you can simply type in a name: Welcome Otherwise, you can create a new workspace by clicking on the top-left corner, then ”+ New Workspace”: creating a workspace

Uploading a CSV file

We will be using web events data for this guide, which you can download here. Click on “Sources” on the left column, then select “File upload”: adding source From here, upload the web_events_sample.csv file we just downloaded. Then, name it web_events_sample_csv, and make sure to select the checkbox ingest data before clicking on “Create source.” upload and ingest data Within a few seconds, all of the data should be ingested. ingested data

Writing queries as features

Now, we can start querying the data to filter, transform, or aggregate data and do analytics, simple as that. Start by creating a pipe by clicking on “Pipes”, then typing in name topreferrers. Once created, add the below query inside the node and run to get the results.
SELECT
  referrer,
  COUNT() AS num_referrers
FROM web_events_sample_csv
GROUP BY referrer
ORDER BY num_referrers DESC
LIMIT 3
top referrers

Exposing the features through an API

Once completed, you can click on Publish to publish the query as an endpoint. You can view the endpoint once it’s published. top referrers endpoint From here, you can use your endpoint in JavaScript, Python, or cUrl by simply copying and pasting. top referrers results You can also unpublish your endpoint anytime by clicking “Unpublish”.

Next Steps

You’ve successfully uploaded data, and extracted insights using Airfold in a few simple steps! This workflow enables intuitive interaction with data, transforming raw events data into actionable insights. Check out how to do this through the CLI through Quickstart (CLI).