Dhiraj
Dhiraj

Reputation: 3696

knowing if a Kusto table has overridden cahcing/retention policy

When we fire the following command against a specific database , we get all the policy info for all the tables in that database:-

.show tables details

But how to determine if a certain policy (e.g. Caching or Retention) that is shown there is because it is inherited from database policy or it is specifically overridden for that table (which is supported too) ? Is there a command to get that information as well , some sort of per table per policy level flag which will tell us if it was overridden.

Upvotes: 0

Views: 555

Answers (1)

Yoni L.
Yoni L.

Reputation: 25895

  • to see a policy defined at database level (or null, if not defined at database-level), run: .show database DATABASE_NAME policy POLICY_KIND.

    • for example: .show database MyDatabase policy retention
  • to see a policy defined at table level (or null, if not defined at table-level), run: .show table TABLE_NAME policy POLICY_KIND.

    • for example: .show table MyTable policy retention.
    • if this returns null as the Policy - the database-level policy, if set, is in effect.

as you mentioned correctly, .show tables details shows you the effective policy on the table, taking into account both database-level and table-level policies, if those are set (not null).

Upvotes: 3

Related Questions