datatable
This page explains how to use the datatable data source in APL.
The datatable operator defines an inline table with a fixed schema and literal row values. Use datatable to build small lookup tables, test APL operators and functions, or supply reference data without ingesting a dataset.
Usage
Syntax
APL
Parameters
ColumnName: ColumnType: One or more column definitions specifying each column's name and scalar type (for example,string,int,long,real,bool,datetime,timespan,dynamic).Value1, Value2, ...: Comma-separated literal values ordered row by row across the declared columns.
Returns
Returns a table with the specified schema and rows.
Examples
Build an inline table and summarize
Query
APL
Output
| service | avg_latency |
|---|---|
| api | 150 |
| web | 90 |
Use datatable as a lookup table
Query
APL
List of related operators
- print: Outputs a single row of evaluated scalar expressions.
- lookup: Enriches a dataset with columns from a constant lookup table.
- externaldata: Loads a table from an external storage URI.