Identity Column in Azure data explorer

Kesav 1 Reputation point
2021-07-20T07:18:56.53+00:00

Hi,

I want to create table in azure data explorer like below.

.create table Test (Id:int, Name: string)

I will get the "Name" value from blob source file but for each row i am ingesting into "Test" table in Azure data explorer i have to generate the identity value (sequence number). Is there any way that we can do it (might be in the table creation structure itself or anyother way also fine.

Thanks,
Kesav

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
525 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MartinJaffer-MSFT 26,086 Reputation points
    2021-07-20T23:37:36.087+00:00

    Hello @Kesav and welcome to Microsoft Q&A.

    Unfortunately I haven't found an obvious "auto-increment" column feature. I do have some ideas to get around this.

    So far the closest things I have found, is source line number. I believe that is on a per-ingestion-file basis( ? needs testing).
    Beyond that, perhaps a conversion from ingestion time,.

    Another possibility is a 2-step process, using update policy to effect a calculated column based upon the previous maximum identity value.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.