Adding Tags to Extents

Bexy Morgan 260 Reputation points
2023-08-21T10:28:15.86+00:00

During 1st time data ingestion using below command 1 extent will be created.

.create table t1 ( Timestamp:datetime, From:string, TravelMode:string, Tier:string)
 .ingest inline into table t1 <|  
2010-01-01,NY,Flight,Premium
2010-01-02,Boston,Train,Economy
2010-01-02,NY,Flight,Business
2010-01-02,Boston,Bus,Business

Similary, using below code when ingesting some set of rows again another extent gets created

.ingest inline into table  t1 <|
2010-01-01T00:00:00Z,SF,Cruise,Premium 

Using below command I get the total 2 extends but Tags column as empty.

.show table t1 extents

Now, how would I be able to add Tags for each extents?

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.
576 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 36,761 Reputation points MVP Volunteer Moderator
    2023-08-21T11:02:00.47+00:00

    Hello @Bexy Morgan ,

    adding tags is done right at the moment of ingestion (although appending this, later on, is also possible but a bit harder).

    Here is an example. I do it in two steps:

    The first run:

    .ingest inline  into table t1 with (tags = '["run:1"]') <|  
    2010-01-01,NY,Flight,Premium
    2010-01-02,Boston,Train,Economy
    2010-01-02,NY,Flight,Business
    2010-01-02,Boston,Bus,Business
    

    The second run:

    .ingest inline into table  t1 with (tags = '["run:2"]') <|
    2010-01-01T00:00:00Z,SF,Cruise,Premium 
    

    Two extents are created, the same way you have experienced it.

    You can check for the tags with either 'contains':

    User's image

    Or you can check it individual ones with 'has':

    User's image

    Now you have control over the tags during creation of records.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


0 additional answers

Sort by: Most helpful

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.