Dhiraj
Dhiraj

Reputation: 3696

Detecting schema change in database

Is there a standard way of detecting if database schema changed? Particularly I am interested in knowing whether any table schema in a database changed or whether any new table got added since I last checked (defined frequency of check) ? One crude way of doing that is to keep polling the cluster for this information using .show database schema at fixed interval and also storing this result for comparison for the next check. But is there a way provided by ADX for doing something like this? Some sort of event trigger that I can listen to as and when this change happens instead of polling the cluster every now and then ? I don't expect database schema changes to happen frequently but they can happen abruptly so it is overhead to keep checking now and then.

Upvotes: 1

Views: 517

Answers (1)

Yoni L.
Yoni L.

Reputation: 25895

There's no event trigger of that sort as of this writing.

With current means, you can periodically use .show journal to monitor for any schema changes: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/management/journal

You can also make sure all schema changes go through source control, and none are manually done on your cluster - so that you end up with tighter control over the E2E process. See: https://learn.microsoft.com/en-us/azure/data-explorer/tools-integrations-overview#source-control-integration

Upvotes: 2

Related Questions