@@ -69,6 +69,12 @@ A job defines the queries and model parameters for a machine learning task.
6969 Type : schema .TypeMap ,
7070 Required : true ,
7171 },
72+ "custom_labels" : {
73+ Description : "An object representing the custom labels added on the forecast." ,
74+ Type : schema .TypeMap ,
75+ Optional : true ,
76+ Default : nil ,
77+ },
7278 "interval" : {
7379 Description : "The data interval in seconds to train the data on." ,
7480 Type : schema .TypeInt ,
@@ -148,6 +154,7 @@ func ResourceJobRead(ctx context.Context, d *schema.ResourceData, meta interface
148154 d .Set ("query_params" , job .QueryParams )
149155 d .Set ("interval" , job .Interval )
150156 d .Set ("hyper_params" , job .HyperParams )
157+ d .Set ("custom_labels" , job .CustomLabels )
151158 d .Set ("training_window" , job .TrainingWindow )
152159 d .Set ("holidays" , job .Holidays )
153160
@@ -196,6 +203,7 @@ func makeMLJob(d *schema.ResourceData, meta interface{}) (mlapi.Job, error) {
196203 Interval : uint (d .Get ("interval" ).(int )),
197204 Algorithm : "grafana_prophet_1_0_1" ,
198205 HyperParams : d .Get ("hyper_params" ).(map [string ]interface {}),
206+ CustomLabels : d .Get ("custom_labels" ).(map [string ]interface {}),
199207 TrainingWindow : uint (d .Get ("training_window" ).(int )),
200208 TrainingFrequency : uint (24 * time .Hour / time .Second ),
201209 Holidays : common .ListToStringSlice (d .Get ("holidays" ).([]interface {})),
0 commit comments