<?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 to read the CDF logs in DLT Pipeline? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103592#M41506</link>
    <description>&lt;P&gt;Hello VZLA,&lt;BR /&gt;Yes, my catalog is inside UC! Isn't a best practice? I'm the owner who created the catalog, Is needed to assign a grant privileges?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PERMISSION_DENIED: User does not have permission to access event logs of &amp;lt;table&amp;gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 16:51:17 GMT</pubDate>
    <dc:creator>jeremy98</dc:creator>
    <dc:date>2024-12-30T16:51:17Z</dc:date>
    <item>
      <title>how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103543#M41479</link>
      <description>&lt;P&gt;Hi Community,&lt;BR /&gt;How to read the CDF logs in materialized views created by DLT Pipeline?&lt;/P&gt;&lt;P&gt;Thanks for you time,&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 14:08:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103543#M41479</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2024-12-30T14:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103544#M41480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/133094"&gt;@jeremy98&lt;/a&gt;,&lt;/P&gt;
&lt;P class="p1"&gt;To read the Change Data Feed (CDF) logs in materialized views created by a Delta Live Tables (DLT) pipeline, you can follow these steps:&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;Enable Change Data Feed&lt;/STRONG&gt;: Ensure that the change data feed is enabled on the base tables of the materialized views. You can enable it using the following SQL command:&lt;/P&gt;
&lt;P class="p1"&gt;ALTER TABLE table1 SET TBLPROPERTIES (delta.enableChangeDataFeed = true);&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;View the Refresh History&lt;/STRONG&gt;: You can view the status of refresh operations on a materialized view, including current and past refreshes, by querying the Delta Live Tables event log. Use the following SQL query to retrieve the relevant information:&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;SELECT *&lt;/P&gt;
&lt;P class="p1"&gt;FROM event_log(TABLE(&amp;lt;fully-qualified-table-name&amp;gt;))&lt;/P&gt;
&lt;P class="p1"&gt;WHERE event_type = 'update_progress'&lt;/P&gt;
&lt;P class="p1"&gt;ORDER BY timestamp DESC;&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Replace &amp;lt;fully-qualified-table-name&amp;gt; with the fully qualified name of the materialized view, including the catalog and schema.&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;Access the Event Log&lt;/STRONG&gt;: The event log for a DLT pipeline can be accessed programmatically. Here is an example query to check if a DLT has run a maintenance task:&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;SELECT &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;timestamp,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;event_type,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;details:maintenance_progress.state,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;message,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;id,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;origin.pipeline_name,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;origin.cluster_id,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;origin.maintenance_id&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;FROM delta.`dbfs:/pipelines/&amp;lt;pipeline-id&amp;gt;/system/events` &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;WHERE event_type = 'maintenance_progress';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Replace &amp;lt;pipeline-id&amp;gt; with the actual pipeline ID.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 14:27:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103544#M41480</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2024-12-30T14:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103550#M41483</link>
      <description>&lt;P&gt;Hi Alberto,&lt;BR /&gt;Thanks for your answer, I got this error:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;PERMISSION_DENIED: User does not have permission to access event logs of `catalog`.`02_gold_layer`.`example_table`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;how to be much flexible? Because I'm not the owner of the table created&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 14:32:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103550#M41483</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2024-12-30T14:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103553#M41484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/133094"&gt;@jeremy98&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Looks like you don't have access can you navigate through the catalog to ensure you have the right permissions assigned to catalog schema and table?&lt;/P&gt;
&lt;P&gt;You should have these permissions:&lt;/P&gt;
&lt;P&gt;GRANT SELECT ON TABLE `catalog`.`02_gold_layer`.`example_table` TO `your_user`;&lt;BR /&gt;GRANT USAGE ON SCHEMA `catalog`.`02_gold_layer` TO `your_user`;&lt;BR /&gt;GRANT USAGE ON CATALOG `catalog` TO `your_user`;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 14:35:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103553#M41484</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2024-12-30T14:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103565#M41488</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;Still I cannot use the event_log table&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 15:03:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103565#M41488</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2024-12-30T15:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103580#M41496</link>
      <description>&lt;P&gt;What error does it give you and have you ensure the required permissions were given? are you able to see the table while looking at data in the browser explorer?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 15:50:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103580#M41496</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2024-12-30T15:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103582#M41498</link>
      <description>&lt;P&gt;Hello Alberto,&lt;BR /&gt;Yes, I can see the data in the browser explorer not the event_log table, the error is the one I submitted to you before. Yes, I gave the useful permissions&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 15:53:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103582#M41498</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2024-12-30T15:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103591#M41505</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/133094"&gt;@jeremy98&lt;/a&gt;&amp;nbsp;is your use case involving DLT + Unity Catalog? If so, then I believe you'll need to grant yourself access to the internal schemas instead.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 16:40:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103591#M41505</guid>
      <dc:creator>VZLA</dc:creator>
      <dc:date>2024-12-30T16:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103592#M41506</link>
      <description>&lt;P&gt;Hello VZLA,&lt;BR /&gt;Yes, my catalog is inside UC! Isn't a best practice? I'm the owner who created the catalog, Is needed to assign a grant privileges?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PERMISSION_DENIED: User does not have permission to access event logs of &amp;lt;table&amp;gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 16:51:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103592#M41506</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2024-12-30T16:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103604#M41518</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/133094"&gt;@jeremy98&lt;/a&gt;&amp;nbsp;just asking to get clarity on the use case and provide a more accurate assistance.&lt;/P&gt;
&lt;P&gt;In UC I believe that being these internal table's with ids, you would have to grant yourself access on the __dlt_materialization_schema_&amp;lt;pipeline_id&amp;gt;, please give it a try and let me know.&lt;/P&gt;
&lt;P&gt;So, assuming your pipeline_id is &lt;EM&gt;&lt;STRONG&gt;"1234_6f26_454c_8e0d_12342134"&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;and your usename &lt;A href="mailto:username@domain," target="_blank" rel="noopener"&gt;username@domain, &lt;/A&gt;then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;%sql 
GRANT use schema ON catalog __databricks_internal TO `username@domain`;
GRANT use catalog ON catalog __databricks_internal TO `username@domain`;
GRANT use schema ON SCHEMA __databricks_internal.__dlt_materialization_schema_1234_6f26_454c_8e0d_12342134 TO `username@domain`;
GRANT SELECT ON SCHEMA __databricks_internal.__dlt_materialization_schema_1234_6f26_454c_8e0d_12341234 TO `username@domain`;​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;And then I hope you should be able to query the __event_log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;%sql
select * from __databricks_internal.__dlt_materialization_schema_1234_6f26_454c_8e0d_12342134.`__event_log` where message like "%main%"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This access is typically granted temporarily and should be revoked after the debugging session to maintain security.&amp;nbsp;So by default, users, including metastore admins, do not have access to these tables to maintain security and prevent accidental data corruption.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try and be very cautious in handling/granting access to it, and as much as possible preserve the access restricted.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 18:11:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103604#M41518</guid>
      <dc:creator>VZLA</dc:creator>
      <dc:date>2024-12-30T18:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103626#M41522</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/34618"&gt;@VZLA&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Thanks for your clarification, very helpful to understand that my goal here is not easily applicable, also because this dlt pipeline and the related event_log tables need to be handle for multiple person in our team. We need to migrate data from gold layer to postgres db. But, without CDF enabled or basically event_log (access table) is more difficult. Although, I tried to grant me the access but I got:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;PERMISSION_DENIED: User does not have MANAGE and USE CATALOG on Catalog '__databricks_internal'.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;In your opinion it is better to migrate our idea to use only Delta Tables with CDF enabled and use simply workflows to manage the changes?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 21:04:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103626#M41522</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2024-12-30T21:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to read the CDF logs in DLT Pipeline?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103668#M41540</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/133094"&gt;@jeremy98&lt;/a&gt;&amp;nbsp;correct,&amp;nbsp;If permissions management is complex, consider using standard Delta tables with CDF enabled and orchestrate changes through Databricks Workflows. This approach simplifies collaboration and avoids issues with restricted internal schema access.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 12:38:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-the-cdf-logs-in-dlt-pipeline/m-p/103668#M41540</guid>
      <dc:creator>VZLA</dc:creator>
      <dc:date>2024-12-31T12:38:32Z</dc:date>
    </item>
  </channel>
</rss>

