You are viewing documentation for an older version.
Input Var
input_var in your Profiles project.less than a minute
An input_var adds a calculated column to an input table. It calculates a single value per row of the input table which can be used as an input for entity_vars.
- input_var:
name: input_var_name
select: SQL statement
from: inputs/table
window:
partition_by:
- partition_column
description: description| Field | Description |
|---|---|
name | Name of the input_var. |
select | SQL state, equivalent to SELECT statement. |
from | Path of the input table, equivalent to FROM statement. |
where | Filtering condition, equivalent to WHERE statement. |
window | Adds partition_by and/or order_by keys for window functions |
description | Description of the input_var. |
Example
- input_var:
name: page_count
description: Adds column to a SQL model to get a page count per date.
select: count(distinct url)
from: models/pages_orderby_table
window:
partition_by:
- profile_id
- date