@Chandramohan, Srinivasan - Thanks for the question and using MS Q&A platform.
To add message headers along with the message body in Azure Data Explorer (ADX), you can use the ingest inline
command. The ingest inline
command allows you to specify the message headers and message body as a single JSON object.
.ingest inline into table MyTable with (format="json")
[
{
"CorrelationId": "1234",
"SchemaVersion": "1.0",
"MessageId": "5678",
"MessageBody": {
"Field1": "Value1",
"Field2": "Value2"
}
}
]
Here is an example of how you can use the ingest inline
command to add message headers and message body to an ADX table:
In this example, we are ingesting a single message into the MyTable
table. The message includes the message headers CorrelationId
, SchemaVersion
, and MessageId
, as well as the message body MessageBody
. The message headers and message body are specified as a single JSON object.
You can modify this example to include your own message headers and message body. You can also use the ingest inline
command to ingest multiple messages at once by specifying an array of JSON objects.
For more details, refer to https://video2.skills-academy.com/en-us/azure/data-explorer/kusto/management/data-ingestion/ingest-inline
I hope this helps! Let me know if you have any further questions.