Configuring the capture events on Azure Event Hub

Mohamed Masood 1 Reputation point
2021-06-23T08:15:18.737+00:00

We have a Azure Event hub to which we publish events using apache kafka protocol. We save the events as avro files by enabling Azure portal's capture events to do that on azure storage gen2. But the problem with this approach is we do not have control over the folder structure that the data is generated on. We want to drive the folder structure based on a particular field available in the event payload to drive our business needs to isolate the data.

Example payload:

{
"id": 1,
"folderName":1,
"body": {}
}

Now we want to drive the folder structure based on the "folder" in the event payload above to isolate data based on our business needs. Something like below:

{folderName}/{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,559 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
719 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2021-06-24T09:34:53.977+00:00

    Hello @Mohamed Masood ,

    Thanks for the question and using MS Q&A platform.

    Unfortunately, it is not possible to create a custom folder structure based on the payload.

    Note: Microsoft only supports the below three capture file formats and we need to use any one of the them.

    109001-image.png

    Hope this helps. Do let us know if you any further queries.

    ------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.

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.