Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GCP Forecast horizon without literal value

Is there a way to set horizon value with ML.FORECAST without using literal value

select value_type as movement_type , date(forecast_timestamp) as month_date, cast(forecast_value as INT64)   as value_count from 
ML.FORECAST(MODEL `model_name`, STRUCT( (select days_left from month_table) as horizon, .90 as confidence_level) )

I get the following error:

 Query error: Invalid table-valued function ML.FORECAST Table Valued Function expects the settings struct to have literal constant

0 2 326
2 REPLIES 2

What documentation are you currently following?

Are there any updates on this?

Getting the same error when declaring a INT64 variable and using it in the settings struct of ML.EXPLAIN_FORECAST.