Overview
In this guide, we’ll develop an API to identify the top-mentioned features in sales calls. We’ll process web events data to extract top referrers using the sample web events CSV file. Our steps include:- Ingesting the dataset
- Executing queries to get the top 3 referrers
- Exposing the features through an API
Create a Workspace
Before we begin, we need to create a workspace to store our data and resources, as well as a token to authenticate our CLI.- Go to Airfold and create a new workspace.
- Copy an admin token from the workspace’s Keys page.
aft_6eab8fcd902e4cbfb63ba174469989cd.Ds1PME5dQsJKosKQWVcZiBSlRFBbmhzIocvHg8KQddV
.
Set up the CLI.
The CLI requires Python 3.10 or higher.
- Install the CLI using
pip install airfold-cli
. - Run
af config
and paste your token when prompted.
Create a Source
First, download web_events_sample.csv To create a source, a YAML file defining the source is required.Let’s generate a source by inferring the schema from a CSV file.
(Replace
/path/to/web_events_sample.csv
with the actual path):
./sources/web_events_sample.yaml
Ingest Data
With the source set up, ingest the CSV data:Further Analysis with Pipes
To identify top referrers in web events data, create aninsights.yaml
file:
insights.yaml