<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How should I correctly extract the full table name from request_params in audit logs? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149305#M53068</link>
    <description>&lt;P&gt;See if this helps -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/admin/system-tables/data-classification#get-number-of-users-who-queried-tables-with-sensitive-data-in-last-30-days" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/admin/system-tables/data-classification#get-number-of-users-who-queried-tables-with-sensitive-data-in-last-30-days&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Feb 2026 17:37:05 GMT</pubDate>
    <dc:creator>pradeep_singh</dc:creator>
    <dc:date>2026-02-25T17:37:05Z</dc:date>
    <item>
      <title>How should I correctly extract the full table name from request_params in audit logs?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149019#M53006</link>
      <description>&lt;P&gt;’m trying to build a UC usage/refresh tracking table for every workspace. For each workspace, I want to know how many times a UC table was refreshed or accessed each month. To do this, I’m reading the Databricks audit logs and I need to extract only the correct full table name from the request_params field.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample Output Table (What I’m Trying to Build):&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Just to show what I’m aiming for:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp; &lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="57px"&gt;&lt;STRONG&gt;workspace_id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="57px"&gt;&lt;STRONG&gt;workspace_name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="57px"&gt;&lt;STRONG&gt;month (event date)&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="57px"&gt;&lt;STRONG&gt;full_table_name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="57px"&gt;&lt;STRONG&gt;Refresh_count (count of distinct event date)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;12345&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;ws-prod&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;2026-01-01&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;main.sales.orders&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;12345&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;ws-prod&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;2026-01-01&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;main.marketing.accounts&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;67890&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;ws-dev&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;2026-01-01&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;&lt;DIV&gt;main.hr.employee_master&lt;/DIV&gt;&lt;/TD&gt;&lt;TD height="30px"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;While parsing request_params, I’m seeing multiple different structures depending on the event type:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;table_full_name&lt;/LI&gt;&lt;LI&gt;full_name_arg&lt;/LI&gt;&lt;LI&gt;securables (array with type and full_name)&lt;/LI&gt;&lt;LI&gt;separate fields like catalog, schema, and table&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Because of this inconsistency, I’m not sure which one is the correct or recommended field to extract the full table name from. My goal is to capture a clean and reliable &amp;lt;catalog&amp;gt;.&amp;lt;schema&amp;gt;.&amp;lt;table&amp;gt; value for each refresh/access event.&lt;/P&gt;&lt;H3 id="toc-hId-1423376836"&gt;&lt;STRONG&gt;My question:&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;What is the right or best‑practice approach to handle these different structures in request_params and determine which field should be treated as the authoritative full table name?&lt;/P&gt;&lt;P&gt;I want to avoid extracting the wrong name or parsing unnecessary fields, and I’d like to follow whatever Databricks considers the standard going forward.&lt;/P&gt;&lt;P&gt;Any guidance or recommendations would be appreciated.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Feb 2026 05:43:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149019#M53006</guid>
      <dc:creator>Danish11052000</dc:creator>
      <dc:date>2026-02-23T05:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: How should I correctly extract the full table name from request_params in audit logs?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149304#M53067</link>
      <description>&lt;P&gt;Can you share the query/code you are running currently ?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 17:19:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149304#M53067</guid>
      <dc:creator>pradeep_singh</dc:creator>
      <dc:date>2026-02-25T17:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How should I correctly extract the full table name from request_params in audit logs?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149305#M53068</link>
      <description>&lt;P&gt;See if this helps -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/admin/system-tables/data-classification#get-number-of-users-who-queried-tables-with-sensitive-data-in-last-30-days" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/admin/system-tables/data-classification#get-number-of-users-who-queried-tables-with-sensitive-data-in-last-30-days&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 17:37:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149305#M53068</guid>
      <dc:creator>pradeep_singh</dc:creator>
      <dc:date>2026-02-25T17:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: How should I correctly extract the full table name from request_params in audit logs?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149412#M53088</link>
      <description>&lt;P&gt;I would use delta history for that.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2026 17:57:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149412#M53088</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2026-02-26T17:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: How should I correctly extract the full table name from request_params in audit logs?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149584#M53126</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/202980"&gt;@pradeep_singh&lt;/a&gt;&amp;nbsp;for the quick help!&lt;BR /&gt;Sharing my understanding so others can benefit:&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;&amp;nbsp;Why I was getting inconsistent UC table names&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;In the Databricks system.access.audit logs, the table metadata can appear in &lt;STRONG&gt;multiple request_params fields&lt;/STRONG&gt;, depending on the API/action used:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;table_full_name – appears for most Delta/UC ops&lt;/LI&gt;&lt;LI&gt;full_arg_name – appears for some Catalog operations&lt;/LI&gt;&lt;LI&gt;Nested: catalog_name, schema_name, table_name – appears for granular resource access logs&lt;/LI&gt;&lt;LI&gt;table_url / url – appears for legacy paths or volume-like structures&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Because these were populated differently across actions (getTable, listSummaries, updateTable, etc.), I saw inconsistent table names.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Correct approach: Use a prioritized COALESCE&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;To avoid missing any UC table, the right way is to &lt;STRONG&gt;extract the table name in priority order&lt;/STRONG&gt;, falling back to the next field only if the previous one is NULL.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;WITH workspace_details AS (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'UC' as usage_type,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.workspace_id,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w.workspace_name,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COALESCE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['full_arg_name'],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Priority 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['table_full_name'],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Priority 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONCAT(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['catalog_name'], '.', &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['schema_name'], '.', &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['table_name']&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Priority 3&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['table_url'],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Priority 4&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.request_params['url']&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Priority 5 (fallback)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) AS full_table_name,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.event_date,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COALESCE(a.request_params['table_url'], a.request_params['url']) AS path&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM system.access.audit a&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEFT JOIN system.access.workspaces_latest w&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON a.workspace_id = w.workspace_id&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE event_date &amp;gt;= current_date() - {days}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;H3&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;This approach ensures:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Consistent UC table identification&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;No more missing or mismatched table names across operations&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks again &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/202980"&gt;@pradeep_singh&lt;/a&gt;&amp;nbsp;&amp;nbsp;— this solution works much better now.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Mar 2026 05:43:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/149584#M53126</guid>
      <dc:creator>Danish11052000</dc:creator>
      <dc:date>2026-03-02T05:43:30Z</dc:date>
    </item>
    <item>
      <title>Hi @Danish11052000, You are on the right track with the C...</title>
      <link>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/150331#M53367</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/188867"&gt;@Danish11052000&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You are on the right track with the COALESCE approach. The reason for the inconsistency is that different Unity Catalog action types populate different keys in request_params. Here is a breakdown of the key fields and which actions use them, plus a refined query.&lt;/P&gt;
&lt;P&gt;WHICH REQUEST_PARAMS KEYS HOLD THE TABLE NAME&lt;/P&gt;
&lt;P&gt;1. full_name_arg: This is the most common key for Unity Catalog operations like getTable, updateTable, deleteTable, and getTableSummaries. It contains the full three-part name (catalog.schema.table). The Databricks documentation for the system.access.audit table schema specifically shows full_name_arg as the example key.&lt;/P&gt;
&lt;P&gt;2. table_full_name: Used by some DML/write-path events and internal operations.&lt;/P&gt;
&lt;P&gt;3. Separate fields (catalog_name, schema_name, table_name): Used by certain granular operations like createTable where the parts are passed individually.&lt;/P&gt;
&lt;P&gt;4. name: Some events use a generic "name" key that may hold the full three-part name.&lt;/P&gt;
&lt;P&gt;Note: One small correction to your self-answer, the documented key name is full_name_arg (not full_arg_name). Worth double-checking in your environment, but the official docs reference full_name_arg.&lt;/P&gt;
&lt;P&gt;RECOMMENDED QUERY&lt;/P&gt;
&lt;P&gt;Here is a refined version of the COALESCE approach with filtering for Unity Catalog table events and the aggregation to build your target output:&lt;/P&gt;
&lt;PRE&gt;SELECT
  a.workspace_id,
  w.workspace_name,
  DATE_TRUNC('month', a.event_date) AS month,
  COALESCE(
      a.request_params['full_name_arg'],
      a.request_params['table_full_name'],
      CASE
          WHEN a.request_params['catalog_name'] IS NOT NULL
              AND a.request_params['schema_name'] IS NOT NULL
              AND a.request_params['table_name'] IS NOT NULL
          THEN CONCAT(
              a.request_params['catalog_name'], '.',
              a.request_params['schema_name'], '.',
              a.request_params['table_name']
          )
      END,
      a.request_params['name']
  ) AS full_table_name,
  COUNT(DISTINCT a.event_date) AS refresh_count
FROM system.access.audit a
LEFT JOIN system.information_schema.catalog_tags ct
  ON 1=0  -- placeholder, see workspace join below
LEFT JOIN system.access.workspaces_latest w
  ON a.workspace_id = w.workspace_id
WHERE a.service_name = 'unityCatalog'
  AND a.action_name IN (
      'getTable', 'createTable', 'deleteTable', 'updateTable',
      'getTableSummaries', 'listTables'
  )
  AND a.event_date &amp;gt;= DATE_TRUNC('month', CURRENT_DATE()) - INTERVAL 6 MONTHS
  AND a.response.status_code = 200
GROUP BY 1, 2, 3, 4
HAVING full_table_name IS NOT NULL
  AND full_table_name LIKE '%.%.%'
ORDER BY 1, 3, 4&lt;/PRE&gt;
&lt;P&gt;A few things this query does:&lt;/P&gt;
&lt;P&gt;1. Filters to service_name = 'unityCatalog' so you only get UC table events, not notebook or cluster events that also have request_params.&lt;BR /&gt;
2. Filters to successful responses (status_code = 200) so you are not counting failed lookups.&lt;BR /&gt;
3. Uses a CASE expression for the CONCAT fallback so it only fires when all three parts are present, avoiding partial names like "catalog_name.null.null".&lt;BR /&gt;
4. The HAVING clause with the LIKE '%.%.%' filter ensures you only keep valid three-part names.&lt;BR /&gt;
5. Aggregates by month with COUNT(DISTINCT event_date) to get your refresh_count metric.&lt;/P&gt;
&lt;P&gt;DISCOVERING WHICH KEYS ARE AVAILABLE&lt;/P&gt;
&lt;P&gt;If you want to see exactly which request_params keys contain table-like values in your environment, this exploration query is useful:&lt;/P&gt;
&lt;PRE&gt;SELECT
  action_name,
  MAP_KEYS(request_params) AS param_keys,
  request_params
FROM system.access.audit
WHERE service_name = 'unityCatalog'
  AND action_name IN ('getTable', 'createTable', 'updateTable', 'deleteTable')
  AND event_date &amp;gt;= CURRENT_DATE() - INTERVAL 7 DAYS
LIMIT 20&lt;/PRE&gt;
&lt;P&gt;This will show you the actual keys present for each action type in your workspace, so you can verify the COALESCE priority order.&lt;/P&gt;
&lt;P&gt;DOCUMENTATION REFERENCE&lt;/P&gt;
&lt;P&gt;The system.access.audit table schema is documented here:&lt;BR /&gt;
&lt;A href="https://docs.databricks.com/en/admin/system-tables/audit-logs.html" target="_blank"&gt;https://docs.databricks.com/en/admin/system-tables/audit-logs.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The audit log event reference (which lists service names and action names):&lt;BR /&gt;
&lt;A href="https://docs.databricks.com/en/admin/account-settings/audit-logs.html" target="_blank"&gt;https://docs.databricks.com/en/admin/account-settings/audit-logs.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;* This reply used an agent system I built to research and draft this response based on the wide set of documentation I have available and previous memory. I personally review the draft for any obvious issues and for monitoring system reliability and update it when I detect any drift, but there is still a small chance that something is inaccurate, especially if you are experimenting with brand new features.&lt;/P&gt;
&lt;P&gt;If this answer resolves your question, could you mark it as "Accept as Solution"? That helps other users quickly find the correct fix.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2026 05:46:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-should-i-correctly-extract-the-full-table-name-from-request/m-p/150331#M53367</guid>
      <dc:creator>SteveOstrowski</dc:creator>
      <dc:date>2026-03-09T05:46:13Z</dc:date>
    </item>
  </channel>
</rss>

