<?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 How to load multiple files and store in fabric warehouse in Data Warehouse</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4983266#M4175</link>
    <description>&lt;P&gt;Currenty project i have a requment where there will be multiple files but i have to read only 10 files and load to warehouse using spark note books. Please suggest me best approach and spark code to implement this&lt;/P&gt;</description>
    <pubDate>Sat, 31 Jan 2026 18:17:06 GMT</pubDate>
    <dc:creator>Rahul_6610</dc:creator>
    <dc:date>2026-01-31T18:17:06Z</dc:date>
    <item>
      <title>How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4983266#M4175</link>
      <description>&lt;P&gt;Currenty project i have a requment where there will be multiple files but i have to read only 10 files and load to warehouse using spark note books. Please suggest me best approach and spark code to implement this&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2026 18:17:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4983266#M4175</guid>
      <dc:creator>Rahul_6610</dc:creator>
      <dc:date>2026-01-31T18:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4990861#M4181</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1527167" data-lia-user-login="Rahul_6610" class="lia-mention lia-mention-user"&gt;Rahul_6610&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd start by getting the files into a Lakehouse. You can do this externally using ADLS Gen 2 APIs, or use a Fabric Copy Job or Pipeline with a Copy Activity to do this. You may also be able to use a ntoebook to copy the files now that notebooks can access connections, but I have not tested that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once they are in the lakehouse, you can use notebooks to interact with them and do whatever ETL needs to be done, and load them to a table in the lakehouse.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The last step is to use a copy activity or copy job to move the tables into the warehouse.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2026 15:09:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4990861#M4181</guid>
      <dc:creator>tayloramy</dc:creator>
      <dc:date>2026-02-02T15:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4995481#M4187</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;BR /&gt;In this task, many files can arrive in the source folder, but only &lt;STRONG&gt;10 files should be processed at a time&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Proposed Solution:&lt;/STRONG&gt;&lt;BR /&gt;To handle this, the Spark notebook first checks which files are available, then picks only the first 10 files and loads them into the warehouse. After the data is successfully loaded, those files are marked as processed or moved to a separate folder, so they are not picked up again.&lt;/P&gt;&lt;P&gt;This approach keeps the process controlled, efficient, and safe, and ensures that one large batch of files doesn’t overload the system. For scenarios where files arrive continuously, Spark’s Auto Loader can be used to automatically process a fixed number of files per run.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Streaming Version (Auto Loader)&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark.readStream \
  .format("cloudFiles") \
  .option("cloudFiles.format", "csv") \
  .option("cloudFiles.maxFilesPerTrigger", 10) \
  .load(SOURCE_PATH) \
  .writeStream \
  .format("delta") \
  .option("checkpointLocation", "/chk/sales") \
  .toTable(TARGET_TABLE)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Or you can use Pipeline copy activity or dataflow Gen -2, which is more UI friendly options.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#993300"&gt;&lt;STRONG&gt;If this helped, ✓ Mark as Solution | Kudos appreciated&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 16:01:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4995481#M4187</guid>
      <dc:creator>Murtaza_Ghafoor</dc:creator>
      <dc:date>2026-02-04T16:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4996477#M4192</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1527167" data-lia-user-login="Rahul_6610" class="lia-mention lia-mention-user"&gt;Rahul_6610&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;You can certainly use Spark Notebooks. But if your requirement is simple ingestion, I would recommend to use either &lt;STRONG&gt;Pipeline (Copy Activity)&lt;/STRONG&gt; or &lt;STRONG&gt;Dataflow Gen2&lt;/STRONG&gt; for &lt;U&gt;low-code ingestion experience&lt;/U&gt;. It's fairly easy to use, and supports wide range of source connections.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Once you are more comfortable, or &lt;STRONG&gt;if you need finer-grained control (over files' selection)&lt;/STRONG&gt;, using a notebook makes sense. Just &lt;STRONG&gt;provide a bit more context such as location&lt;/STRONG&gt; of your files (ADLS, local or another database) and how the target files can be identified (&lt;STRONG&gt;file_name pattern&lt;/STRONG&gt;, file type, etc.), and &lt;STRONG&gt;one of us can share a simplified code&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 10:40:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4996477#M4192</guid>
      <dc:creator>stoic-harsh</dc:creator>
      <dc:date>2026-02-05T10:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4999182#M4201</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1527167" data-lia-user-login="Rahul_6610" class="lia-mention lia-mention-user"&gt;Rahul_6610&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have 2 options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Use Spark notebook&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use Spark to read the 10 files and then using Synapse/fabric connector to write directly to your Warehouse. You can use regex to select the 10 files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import re
from notebookutils import mssparkutils

SOURCE_DIR = "abfss://container@storage.dfs.core.windows.net/data/"

# List contents
entries = mssparkutils.fs.ls(SOURCE_DIR)

# Regex: only parquet files with YYYYMMDD at end (change as needed)
pattern = re.compile(r".*_(\d{8})\.parquet$")

# Filter
matches = [f.path for f in entries if pattern.match(f.name)]

# Choose only 10
files_to_load = sorted(matches)[:10]

df = spark.read.parquet(files_to_load)
df.show()

#write to sql warehouse
df.write.format("jdbc")....&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Use TSQL with OPENROWSET&lt;/P&gt;&lt;LI-CODE lang="python"&gt;INSERT INTO dbo.MyEntity (Col1, Col2, _ingest_time_utc, _source_path)
SELECT
    r.Col1,
    r.Col2,
    SYSUTCDATETIME() AS _ingest_time_utc,
    r.$path          AS _source_path
FROM OPENROWSET(
        BULK 'https://onelake.dfs.fabric.microsoft.com/&amp;lt;workspace-guid&amp;gt;/&amp;lt;lakehouse-guid&amp;gt;/Files/myfolder/*.parquet',
        FORMAT = 'PARQUET'&lt;/LI-CODE&gt;&lt;DIV&gt;OPENROWSET in Fabric supports reading files directly (Parquet/CSV/JSONL), wildcards, partition path extraction via filepath(), and can be used inside INSERT statements&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I would recommend you use TSQL and OPENROWSET over a Spark notebook.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 12:42:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/4999182#M4201</guid>
      <dc:creator>deborshi_nag</dc:creator>
      <dc:date>2026-02-06T12:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/5000711#M4220</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1505413" data-lia-user-login="stoic-harsh" class="lia-mention lia-mention-user"&gt;stoic-harsh&lt;/a&gt;&amp;nbsp; already mentioned you can do this with a simple data copy activity, this will allow you to read a whole range of filetypes into a lakehouse, from there you can copy the data, with any ETL you would like, into warehouse. There is no need to use a notebook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Couple of questions though.&amp;nbsp;&lt;BR /&gt;1: You mention you only need 10 files read, how are these 10 files defined, are they fixed filenames, is it only todays date etc etc?&amp;nbsp; The key here is that you need a way to pinpoint these files, with either a wildcard or a filelist for instance. Fabric will read either a specific file, a&amp;nbsp; wildcard file defnition, or a filelist. You can use dynamic expressions to define the filename as well.&lt;/P&gt;&lt;P&gt;2 what is the file type?&amp;nbsp; Fabric can read a bunch of filetypes. Make sure your type is one of them.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 03:30:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/5000711#M4220</guid>
      <dc:creator>smeetsh</dc:creator>
      <dc:date>2026-02-09T03:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/5000764#M4221</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1527167" data-lia-user-login="Rahul_6610" class="lia-mention lia-mention-user"&gt;Rahul_6610&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Have you had a chance to review the solution we shared by &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="695681" data-lia-user-login="Murtaza_Ghafoor" class="lia-mention lia-mention-user"&gt;Murtaza_Ghafoor&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1505413" data-lia-user-login="stoic-harsh" class="lia-mention lia-mention-user"&gt;stoic-harsh&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1445078" data-lia-user-login="deborshi_nag" class="lia-mention lia-mention-user"&gt;deborshi_nag&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="718450" data-lia-user-login="smeetsh" class="lia-mention lia-mention-user"&gt;smeetsh&lt;/a&gt;&amp;nbsp;? If the issue persists, feel free to reply so we can help further.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 04:31:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/5000764#M4221</guid>
      <dc:creator>v-saisrao-msft</dc:creator>
      <dc:date>2026-02-09T04:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files and store in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/5012485#M4255</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1527167" data-lia-user-login="Rahul_6610" class="lia-mention lia-mention-user"&gt;Rahul_6610&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Checking in to see if your issue has been resolved. let us know if you still need any assistance.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2026 04:12:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/How-to-load-multiple-files-and-store-in-fabric-warehouse/m-p/5012485#M4255</guid>
      <dc:creator>v-saisrao-msft</dc:creator>
      <dc:date>2026-02-13T04:12:08Z</dc:date>
    </item>
  </channel>
</rss>

