WARNING: Failed to add policy job since the add condition is not satisfied

157 Views Asked by At

I'm trying to schedule automatic recommendation and population by following this doc.

I'm trying to run this query

SELECT google_columnar_engine_add_policy( 'RECOMMEND_AND_POPULATE_COLUMNS', 'EVERY', 10, 'HOURS');

But this query fails. I've tried many other combinations of policy_interval, duration, time_unit, and it fails with the same error every time.

Only one case works, that is when policy_interval is "IMMEDIATE" but this is not what I'm after.

1

There are 1 best solutions below

0
On

The basic steps to follow for the configuation and usage are as below:

  • Enable the columnar engine.

  • Let the engine's recommendation feature observe your workload and
    gather query statistics

  • Size the engine's column store based on the recommendation feature's analysis.

  • Enable automatic population of the column store by the recommendation feature.

  • Let the recommendation feature observe your workload and automatically add columns to the column store.

The query that you are trying to run is for Schedule automatic recommendation and population

(
  'RECOMMEND_AND_POPULATE_COLUMNS',
  policy_interval, duration, time_unit
);

policy_interval: The time interval determining when the policy runs. You can specify these values:

'IMMEDIATE': The RECOMMEND_AND_POPULATE_COLUMNS operation runs immediately one time. When you use this value, specify 0 and 'HOURS' for the duration and time_unit parameters.

'AFTER': The RECOMMEND_AND_POPULATE_COLUMNS operation runs once when the duration time_unit amount of time passes. 'EVERY': The RECOMMEND_AND_POPULATE_COLUMNS operation runs repeatedly every duration time_unit amount of time.

duration: The number of time_units. For example, 24.

time_unit: The unit of time for duration. You can specify 'DAYS'or 'HOURS'.

Please check if this was followed from setup to configuration and try again.Also as you mentioned, the specific errors are not available with you for clearly understanding the breakpoint here.I would recommend you to check the below link for reference.

https://cloud.google.com/alloydb/docs

https://cloud.google.com/alloydb/docs/faq

Hope that helps.