'Read .xel Files in Blob Storage Using SQL or Python

When auditing is enabled for Azure SQL Database, .xel files are created in a Azure Blob Storage account (when configured to do so).

I know audit logs can be viewed through the Azure Portal by navigating to Auditing on the database server, but I want to be able to read these files using either SQL or Python. My ultimate goal is to read the files into some data structure like a pandas DataFrame in Python, but this can even be handled in SQL, I believe, by creating a VIEW or a STORED PROCEDURE which I can read/call in Python.

How can I go about doing this?



Solution 1:[1]

Read the contents of the .xel file with the sql function sys.fn_xe_file_target_read_file from extended event sessions you create yourself and store in Azure Blob Storage.

sys.fn_xe_file_target_read_file ( path, mdpath, initial_file_name, initial_offset )

Example :

The example below pulls events from all .xel files in the default folder. The default place is \MSSQL\Log in the instance's installation folder.

SELECT * FROM sys.fn_xe_file_target_read_file('*.xel', null, null, null)

you can refer this document.

Solution 2:[2]

i don't know if this solves your problem or not u can use datalist tag in html which work kind of similar it will filter everything except what u have typed in search box instead of focusing at that element.

<label for="browser">Choose your browser from the list:</label>
  <input list="browsers" name="browser" id="browser">
  <datalist id="browsers">
    <option value="Edge">
    <option value="Firefox">
    <option value="Chrome">
    <option value="Opera">
    <option value="Safari">
  </datalist>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 PratikLad-MT
Solution 2 gulam ahmad siddique