diff --git a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx index 4067ff258..cc89efaaf 100644 --- a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx +++ b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx @@ -39,7 +39,7 @@ export const CreateAccelerationButton = ({ const requestPayload: DirectQueryRequest = { lang: 'sql', - query: accelerationQueryBuilder(accelerationFormData), + query: accelerationQueryBuilder(accelerationFormData).replaceAll(/\s+/g, ' '), datasource: accelerationFormData.dataSource, }; diff --git a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx index b20626795..ee59f470f 100644 --- a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx +++ b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx @@ -24,7 +24,7 @@ export const buildIndexOptions = (accelerationformData: CreateAccelerationForm) // Add index settings option indexOptions.push( - `index_settings = '{"number_of_shards":${primaryShardsCount},"number_of_replicas":${replicaShardsCount}}'` + `index_settings = '{\\"number_of_shards\\":${primaryShardsCount},\\"number_of_replicas\\":${replicaShardsCount}}'` ); // Add auto refresh option