Forum Discussion
ashgoel1895
Dec 02, 2020Copper Contributor
Is there any way to update data in ADX?
I know that ADX is read-only but if you did need to update data in ADX what would be the best practice?
5 Replies
- UriBarash
Microsoft
If you want to delete a large set of data elements you can use .drop extents - https://docs.microsoft.com/en-us/azure/data-explorer/kusto/management/drop-extents - UriBarash
Microsoft
In extreme cases (build for GDPR) you can also use purge https://docs.microsoft.com/en-us/azure/data-explorer/kusto/concepts/data-purge to delete a row. - UriBarash
Microsoft
ADX is an append only data platform . You can insert a new version of the data and filter for the last version using arg_max and materialized views.- ashgoel1895Copper Contributor
UriBarash - Thanks for your response. Do rows in ADX have a version number that we can utilise for this purpose or would it be our responsibility to have this in our data model?
- UriBarash
Microsoft
ashgoel1895 - Rows do not have a unique ID but you can add one (before you ingest or using an update policy with new_guid() )
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/management/updatepolicy
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/newguidfunction