Based on a request by Microsoft Test Consultant Robert George, this SQL Snacks™ along with a tool I am releasing to the community will allow you to run a Transact-SQL workload on Azure SQL Database, capture the xel files to Azure Blob Storage, and then process them to produce an executable Transact-SQL Script that duplicates the captured workload.
The source code (quite simple) is available on my GitHub repo https://github.com/bobtaylor29708/xel2sql
QueryableXEventData events =
using (FileStream f = File.Create(outputFileSpec))
foreach (PublishedEvent evt in events)
if (evt.Name == "rpc_starting"
|| evt.Name == "sql_batch_starting"
|| evt.Name == "login"
|| evt.Name == "logout")
// do some work here. In my case write to the FileStream