@@ -901,7 +901,10 @@ def arrow_schema_to_bq_schema(arrow_schema: pyarrow.Schema) -> List[SchemaField]
901
901
{{ featureview.created_timestamp_column ~ ' as created_timestamp,' if featureview.created_timestamp_column else '' }}
902
902
{{ featureview.entity_selections | join(', ')}}{% if featureview.entity_selections %},{% else %}{% endif %}
903
903
{% for feature in featureview.features %}
904
- {{ feature }} as {% if full_feature_names %}{{ featureview.name }}__{{featureview.field_mapping.get(feature, feature)}}{% else %}{{ featureview.field_mapping.get(feature, feature) }}{% endif %}{% if loop.last %}{% else %}, {% endif %}
904
+ {{ feature | backticks }} as {% if full_feature_names %}
905
+ {{ featureview.name }}__{{featureview.field_mapping.get(feature, feature)}}{% else %}
906
+ {{ featureview.field_mapping.get(feature, feature) | backticks }}{% endif %}
907
+ {% if loop.last %}{% else %}, {% endif %}
905
908
{% endfor %}
906
909
FROM {{ featureview.table_subquery }}
907
910
WHERE {{ featureview.timestamp_field }} <= '{{ featureview.max_event_timestamp }}'
@@ -995,14 +998,14 @@ def arrow_schema_to_bq_schema(arrow_schema: pyarrow.Schema) -> List[SchemaField]
995
998
The entity_dataframe dataset being our source of truth here.
996
999
*/
997
1000
998
- SELECT {{ final_output_feature_names | join(', ')}}
1001
+ SELECT {{ final_output_feature_names | backticks | join(', ')}}
999
1002
FROM entity_dataframe
1000
1003
{% for featureview in featureviews %}
1001
1004
LEFT JOIN (
1002
1005
SELECT
1003
1006
{{featureview.name}}__entity_row_unique_id
1004
1007
{% for feature in featureview.features %}
1005
- ,{% if full_feature_names %}{{ featureview.name }}__{{featureview.field_mapping.get(feature, feature)}}{% else %}{{ featureview.field_mapping.get(feature, feature) }}{% endif %}
1008
+ ,{% if full_feature_names %}{{ featureview.name }}__{{featureview.field_mapping.get(feature, feature)}}{% else %}{{ featureview.field_mapping.get(feature, feature) | backticks }}{% endif %}
1006
1009
{% endfor %}
1007
1010
FROM {{ featureview.name }}__cleaned
1008
1011
) USING ({{featureview.name}}__entity_row_unique_id)
0 commit comments