Build features over your data
SELECT
statement to query your tables directly.
These SQL statements can interact with your tables in the same way as standard SQL tables, with additional AI columns you can leverage for deeper insights.
For example, to get the top referrers as in our quickstart example we can run the following command.
countIfState()
instead of countIf()
.Airfold uses ClickHouse under the hood which requires appending State
to aggregate functions when used in a materialized pipe.Fortunately, Airfold does it automatically when materializing a draft pipe using af materialize <pipe_name>
.Learn more about Materialization in ClickHouse, about the *State
combinator.FROM
clause.
Draft pipes are temporary and primarily used for development. Once finalized, a draft pipe can be transitioned into either a published or a materialized pipe, but not both.
publish
and requires the final node’s schema to match the provided source schema. Optional.to
. Optional.{{ param }}
. These parameters are passed via the API and can be used to dynamically alter the pipe’s behavior. Optional.publish
field.
Published pipes can parameterize their SQL using Jinja2 via the params
field.
Unlike draft pipes, published pipes can be accessed (via FROM
) by other pipes.
to
field to the name of the target source.
Although materialized pipes themselves cannot be accessed (via FROM
) by other pipes, the source they write to is accessible like any other source.
countState()
instead of count()
.Airfold uses ClickHouse under the hood which requires appending State
to aggregate functions when used in a materialized pipe.Fortunately, Airfold does it automatically when materializing a draft pipe using af materialize <pipe_name>
.Learn more about Materialization in ClickHouse, about the *State
combinator.prices
table or products
table.
And may be refreshed from a connector or any other external process.
To work with these sources efficiently and create transformations/queries use a "refreshable"
materialization.
af push
.draft_pipe.yaml
: