<?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 Workflow file watch - capture filename trigger in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/workflow-file-watch-capture-filename-trigger/m-p/88804#M37617</link>
    <description>&lt;DIV&gt;With respect to the file watch trigger in workflows, how can we capture what files and or path was identified as raising the trigger?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'd like to use this information to set parameters based upon the file name and the file path&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you!&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A class="" href="https://docs.databricks.com/en/jobs/file-arrival-triggers.html" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/jobs/file-arrival-triggers.html&lt;/A&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Sep 2024 22:35:53 GMT</pubDate>
    <dc:creator>csmcpherson</dc:creator>
    <dc:date>2024-09-05T22:35:53Z</dc:date>
    <item>
      <title>Workflow file watch - capture filename trigger</title>
      <link>https://community.databricks.com/t5/data-engineering/workflow-file-watch-capture-filename-trigger/m-p/88804#M37617</link>
      <description>&lt;DIV&gt;With respect to the file watch trigger in workflows, how can we capture what files and or path was identified as raising the trigger?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'd like to use this information to set parameters based upon the file name and the file path&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you!&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A class="" href="https://docs.databricks.com/en/jobs/file-arrival-triggers.html" target="_blank" rel="noopener"&gt;https://docs.databricks.com/en/jobs/file-arrival-triggers.html&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Sep 2024 22:35:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workflow-file-watch-capture-filename-trigger/m-p/88804#M37617</guid>
      <dc:creator>csmcpherson</dc:creator>
      <dc:date>2024-09-05T22:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow file watch - capture filename trigger</title>
      <link>https://community.databricks.com/t5/data-engineering/workflow-file-watch-capture-filename-trigger/m-p/88847#M37640</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/106415"&gt;@csmcpherson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This is currently not supported, but databricks team is working on that idea according to below thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/t5/data-engineering/file-information-is-not-passed-to-trigger-job-on-file-arrival/td-p/39266" target="_blank"&gt;Solved: File information is not passed to trigger job on f... - Databricks Community - 39266&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As a workaround, if you use autoloader, you can use file _metadata column.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/ingestion/file-metadata-column" target="_blank"&gt;File metadata column - Azure Databricks | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark.readStream \
  .format("cloudFiles") \
  .option("cloudFiles.format", "csv") \
  .schema(schema) \
  .load("abfss://my-bucket/csvData") \
  .selectExpr("*", "_metadata as source_metadata") \
  .writeStream \
  .format("delta") \
  .option("checkpointLocation", checkpointLocation) \
  .start(targetTable)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 09:50:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workflow-file-watch-capture-filename-trigger/m-p/88847#M37640</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-09-06T09:50:51Z</dc:date>
    </item>
  </channel>
</rss>

