Apply Filter {% ... %}
apply_filter
helps to apply filter condition to target field
Using in View
apply_filter
can be used in derived_table parameter.
Target can be a raw SQL:
{% apply_filter view_filter_name %} target {% end_apply_filter %}
Target can be a BlockML field reference of another referenced View:
{% apply_filter view_filter_name %} ${as_name.field_name} {% end_apply_filter %}
Using in Model
apply_filter
can be used in sql_always_where, sql_always_where_calc and sql_where model parameters.
Target can be a raw SQL:
{% apply_filter model_filter_name %} target {% end_apply_filter %}
Target can be a BlockML field reference of model field:
{% apply_filter model_filter_name %} ${model_field_name} {% end_apply_filter %}
Target can be a BlockML field reference of joined view:
{% apply_filter model_filter_name %} ${as_name.filed_name} {% end_apply_filter %}