<?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 DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 byte in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3366665#M481</link>
    <description>&lt;P&gt;Ok so here is my journey:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to use PQ Online - but face a cap of 10 minutes, and kept getting a 10 minute timeout error, and the data flow would fail.&lt;/P&gt;&lt;P&gt;So, I did 80% in PQ, Online in a Gen2 Dataflow, on the less expensive steps (those that were not full scan)&lt;/P&gt;&lt;P&gt;Then I loaded the output from the Gen2 Dataflow to a Lakehouse as a Delta Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I picked up that Delta Table, and processed the remaining 20%, in PySpark, in a Notebook&lt;/P&gt;&lt;P&gt;I then wrote it back to the Lakehouse as a Delta Table. But I could only save the table name as lower case (which was really annoying) - it just wouldn't save the name in UPPER CASE, when I explored things in the Lakehouse File explorer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a while, I decided, instead of writing from the Notebook directly to the Lakehouse, as a Delta Table, to the Table space,, to write the output as Parquet files in the Files space of the Lakehouse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created a Data pipeline with the following activities:&lt;/P&gt;&lt;P&gt;1. Original Gen2 Dataflow (80%) (its ok in performance, about 4 mins on fairly simple steps)&lt;/P&gt;&lt;P&gt;2. Notebook Pyspark (for the remaining 20% - it's super quick!, only 30 seconds - a short time on complex steps)&lt;/P&gt;&lt;P&gt;3. A Copy Activitiy to pick up the Parquet files from the Files space, and write the destination as a Delta Table to Lake House (here in this step, I can actually set the name of Delta Table as UPPER CASE - which is what I all the long wanted)&lt;/P&gt;&lt;P&gt;4. A Delete file steps to delete the temporary Parque files that the Notebook loaded into the File space&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the problem is, when I inspect the Delta Table (with its upper case name), and click view files. The Parquet files behind it (in the Table space), there is 1 file that is 0 KB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I connect to the SQL endpoint and try loading the data in Excel or Power BI, I get the &lt;STRONG&gt;following error&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 bytes'. File/External table name: 'dbo.ACT_ALL_INV_LINE_FINAL'.&lt;BR /&gt;Statement ID: {52DF811F-B06F-4DC8-B690-338B0FFAEA06} | Query hash: 0x529BB7EEE88AA79D | Distributed request ID: {63247B40-034D-4D04-8C5D-C5BAE8378554}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details:&lt;BR /&gt;DataSourceKind=SQL&lt;BR /&gt;DataSourcePath=nfsigzuek6wudkuj4iln6rusta-vf6c7n6onr6elfh354elx7s6ly.datawarehouse.pbidedicated.windows.net;*********&lt;BR /&gt;Message=Error handling external file: 'Invalid: Parquet file size is 0 bytes'. File/External table name: 'dbo.ACT_ALL_INV_LINE_FINAL'.&lt;BR /&gt;Statement ID: {52DF811F-B06F-4DC8-B690-338B0FFAEA06} | Query hash: 0x529BB7EEE88AA79D | Distributed request ID: {63247B40-034D-4D04-8C5D-C5BAE8378554}&lt;BR /&gt;ErrorCode=-2146232060&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No idea how to solve this, or if the approach I'm using is optimum. I'm kind of taking the longer route, / workaround to get to a Delta Table where I can write its name as UPPER CASE, since you can't do that from a notebook in Pyspark,...yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 09:42:00 GMT</pubDate>
    <dc:creator>st_0999</dc:creator>
    <dc:date>2023-08-07T09:42:00Z</dc:date>
    <item>
      <title>DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 byte</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3366665#M481</link>
      <description>&lt;P&gt;Ok so here is my journey:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to use PQ Online - but face a cap of 10 minutes, and kept getting a 10 minute timeout error, and the data flow would fail.&lt;/P&gt;&lt;P&gt;So, I did 80% in PQ, Online in a Gen2 Dataflow, on the less expensive steps (those that were not full scan)&lt;/P&gt;&lt;P&gt;Then I loaded the output from the Gen2 Dataflow to a Lakehouse as a Delta Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I picked up that Delta Table, and processed the remaining 20%, in PySpark, in a Notebook&lt;/P&gt;&lt;P&gt;I then wrote it back to the Lakehouse as a Delta Table. But I could only save the table name as lower case (which was really annoying) - it just wouldn't save the name in UPPER CASE, when I explored things in the Lakehouse File explorer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a while, I decided, instead of writing from the Notebook directly to the Lakehouse, as a Delta Table, to the Table space,, to write the output as Parquet files in the Files space of the Lakehouse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created a Data pipeline with the following activities:&lt;/P&gt;&lt;P&gt;1. Original Gen2 Dataflow (80%) (its ok in performance, about 4 mins on fairly simple steps)&lt;/P&gt;&lt;P&gt;2. Notebook Pyspark (for the remaining 20% - it's super quick!, only 30 seconds - a short time on complex steps)&lt;/P&gt;&lt;P&gt;3. A Copy Activitiy to pick up the Parquet files from the Files space, and write the destination as a Delta Table to Lake House (here in this step, I can actually set the name of Delta Table as UPPER CASE - which is what I all the long wanted)&lt;/P&gt;&lt;P&gt;4. A Delete file steps to delete the temporary Parque files that the Notebook loaded into the File space&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the problem is, when I inspect the Delta Table (with its upper case name), and click view files. The Parquet files behind it (in the Table space), there is 1 file that is 0 KB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I connect to the SQL endpoint and try loading the data in Excel or Power BI, I get the &lt;STRONG&gt;following error&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 bytes'. File/External table name: 'dbo.ACT_ALL_INV_LINE_FINAL'.&lt;BR /&gt;Statement ID: {52DF811F-B06F-4DC8-B690-338B0FFAEA06} | Query hash: 0x529BB7EEE88AA79D | Distributed request ID: {63247B40-034D-4D04-8C5D-C5BAE8378554}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details:&lt;BR /&gt;DataSourceKind=SQL&lt;BR /&gt;DataSourcePath=nfsigzuek6wudkuj4iln6rusta-vf6c7n6onr6elfh354elx7s6ly.datawarehouse.pbidedicated.windows.net;*********&lt;BR /&gt;Message=Error handling external file: 'Invalid: Parquet file size is 0 bytes'. File/External table name: 'dbo.ACT_ALL_INV_LINE_FINAL'.&lt;BR /&gt;Statement ID: {52DF811F-B06F-4DC8-B690-338B0FFAEA06} | Query hash: 0x529BB7EEE88AA79D | Distributed request ID: {63247B40-034D-4D04-8C5D-C5BAE8378554}&lt;BR /&gt;ErrorCode=-2146232060&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No idea how to solve this, or if the approach I'm using is optimum. I'm kind of taking the longer route, / workaround to get to a Delta Table where I can write its name as UPPER CASE, since you can't do that from a notebook in Pyspark,...yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:42:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3366665#M481</guid>
      <dc:creator>st_0999</dc:creator>
      <dc:date>2023-08-07T09:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 byte</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3366672#M482</link>
      <description>&lt;P&gt;I think I know why this was happening&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When Notebook writes the Parquet files, e.g. using the line:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sorted_df.write.mode(&lt;/SPAN&gt;&lt;SPAN&gt;"overwrite"&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"parquet"&lt;/SPAN&gt;&lt;SPAN&gt;).save(&lt;/SPAN&gt;&lt;SPAN&gt;"Files/ + parquet file names)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It also writes a _SUCCESS file.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The Copy step in the Data Pipeline also copies this, which messes up querying the Delta Table. Probably worth the Fabric team looking into fixing?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So I had to in the Data Pipeline:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;1. Original Gen2 Dataflow (80%)&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Notebook Pyspark (for the remaining 20% - it's super quick!, only 30 seconds - a short time on complex steps)&lt;/P&gt;&lt;P&gt;3. Delete the _SUCCESS file only (before the Copy Activity)&lt;/P&gt;&lt;P&gt;4. A Copy Activitiy to pick up the Parquet files from the Files space, and destination as a Delta Table in Lake House (here I can actually set the name of Delta Table as UPPER CASE - which is what I wanted)&lt;/P&gt;&lt;P&gt;5. A Delete file steps to delete the temporary Parque files that the Notebook loaded into the File space&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not ideal, but its a workaround for me! SPARK should really support UPPER CASE table names.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 05 Aug 2023 19:51:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3366672#M482</guid>
      <dc:creator>st_0999</dc:creator>
      <dc:date>2023-08-05T19:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 byte</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3368084#M488</link>
      <description>&lt;P&gt;Great that you have the workaround.&lt;/P&gt;&lt;P&gt;The need to delete&lt;SPAN&gt;_SUCCESS file is tracked as bug internally.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;UPPER CASE for SPARK seems a general limitation of spark side&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/answers/questions/1010584/caps-are-not-preserved-when-creating-delta-tables" target="_blank"&gt;Caps are not preserved when Creating delta tables in Azure Synapse - Microsoft Q&amp;amp;A.&lt;/A&gt;&amp;nbsp;You might consier to feedback to Data Enginnering forum.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:38:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3368084#M488</guid>
      <dc:creator>GraceGu</dc:creator>
      <dc:date>2023-08-07T09:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 byte</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3369081#M492</link>
      <description>&lt;P&gt;You can exclude the SUCCESS file during copy, by using wild card to specify the files to be copied. Something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you used "file path" option, there too if you specify the "file format" as parquet, it shouldnt have copied the success file. If that happens, it looks like a bug, please let me know if that was the case.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 20:14:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3369081#M492</guid>
      <dc:creator>ajarora</dc:creator>
      <dc:date>2023-08-07T20:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: DataSource.Error: Microsoft SQL: Error handling external file: 'Invalid: Parquet file size is 0 byte</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3369097#M493</link>
      <description>&lt;P&gt;Thank you. I will try it. It never occured to me to use a WildCard Copy.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 20:28:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/DataSource-Error-Microsoft-SQL-Error-handling-external-file/m-p/3369097#M493</guid>
      <dc:creator>st_0999</dc:creator>
      <dc:date>2023-08-07T20:28:26Z</dc:date>
    </item>
  </channel>
</rss>

