Creating Custom Datasets with EraQL
This guide demonstrates how to build custom data sets using EraQL, Cotera's powerful query language for advanced data transformations and analysis.

Starting a New Data Set
Begin by locating the New Data Set button on your dashboard and clicking it to open the creation interface.

The data set creation page offers two approaches:
- Select from existing tables for straightforward table connections
- Create dataset from query for advanced customization with EraQL
Choose Create dataset from query to access EraQL's full capabilities for complex logic, custom filtering, and advanced joins.

Writing Your EraQL Query
EraQL uses a structured, readable syntax that makes data definition straightforward. Here's how to construct a basic query:
Start with the From
function and specify your data source:
From({
name: 'CHEW_CREW_AGENT_CONVERSATIONS',
schema: 'COTERA_DATA',
attributes: {
CONVERSATION_ID: float,
USER_ID: float,
CONVERSATION_CREATED_AT: timestamp,
CONVERSATION: string,
},
})
Query Components
Every EraQL data source definition includes three essential elements:
name: The source table identifier
schema: The database schema location
attributes: Column definitions with their corresponding data types
In this example, we're connecting to a conversation table with mixed data types: numeric identifiers (float), timestamps for tracking creation time, and text content (string).
The attributes section uses simple key-value pairs where each key represents a column name and each value specifies the expected data type.
Saving Your Data Set
After configuring your EraQL query, save your work by clicking the Save button in the upper right corner.
A dialog will prompt you to provide a meaningful name for your data set. Use descriptive names that clearly identify the data's purpose - for example, "Agent Conversations."

Click Save to finalize your data set. It will immediately appear in the left sidebar and become available for use across your workspace.

Verification and Next Steps
Your custom data set is now active and connected to live data. You can verify the setup by viewing the populated table with your defined columns and data types.
Advanced Usage
With your EraQL data set established, you can expand its functionality by:
- Adding computed columns and transformations
- Implementing complex filtering logic
- Creating relationships with other data sources
- Modifying the query structure as requirements change
Your EraQL data set provides a flexible foundation for sophisticated data analysis workflows in Cotera.