question

Kesav-2669 avatar image
0 Votes"
Kesav-2669 asked MartinJaffer-MSFT commented

Identity Column in Azure data explorer

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
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Kesav-2669 did my response help you? If it solved your issue, please mark as accepted answer, otherwise let me know how I may better assist you.

0 Votes 0 ·

If you found your own solution, please share it here with the community.

0 Votes 0 ·

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered

Hello @Kesav-2669 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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.