I’m trying to setup Incremental Refresh with Boto API call. I have the following code:
if op_params["import_mode"] == "SPICE":
schedule_params = {
"AwsAccountId": op_params["aws_account_id"],
"DataSetId": op_params["data_set_id"],
"Schedule": {
"ScheduleId": f"{op_params['data_set_id']}Schedule",
"RefreshType": op_params["refreshType"],
"ScheduleFrequency": {
"Interval": op_params["refreshInterval"],
"TimeOfTheDay": op_params["refreshTime"],
"Timezone": op_params["refreshTimezone"],
},
},
}
if op_params["refreshType"] == "INCREMENTAL_REFRESH":
schedule_params["Schedule"]["IncrementalRefresh"] = {
"LookbackWindow": {
"ColumnName": op_params["lookbackWindowColumn"],
"Size": int(op_params["lookbackWindowSize"]),
"Unit": op_params["lookbackWindowUnit"],
}
}
schedule_response = client.create_refresh_schedule(**schedule_params)
I have these parameter values that get passed into the API call:
quicksightDatasetRefresh:
refreshType: "INCREMENTAL_REFRESH"
refreshInterval: "DAILY"
refreshTime: "00:00"
refreshTimezone: "UTC"
lookbackWindowSize: 1
lookbackWindowUnit: "DAY"
lookbackWindowColumn: "timestamp"
When trying to deploy this using CDK I get the following error:
Message returned: Parameter validation failed: Unknown parameter in Schedule: "IncrementalRefresh", must be one of: ScheduleId, ScheduleFrequency, StartAfterDateTime, RefreshType, Arn
When I remove IncrementalRefresh
and LookbackWindow
it complains that there is no LookbackWindow
configured. There is no documentation on the schema for creating incremental refreshes.
Any help would be appreciated!