<?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: Can Dataflow Gen2 read from lakehouse &amp;quot;Files&amp;quot; as a folder? in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422383#M815</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="573254" data-lia-user-login="yjh" class="lia-mention lia-mention-user"&gt;yjh&lt;/a&gt;&amp;nbsp;I realize I wasn't clear at all. I'm not trying to load them into Power BI desktop, I'm trying to use a Dataflow Gen2 to load them into tables in the Lakehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
    <pubDate>Sat, 09 Sep 2023 06:41:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-09T06:41:10Z</dc:date>
    <item>
      <title>Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422262#M813</link>
      <description>&lt;P&gt;Hi, I've uploaded several hundred daily Power BI audit logs into a Lakehouse under the Files area. I'd like to use a Dataflow Gen2 to combine the files and then reshape them. Is there a way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use a Lakehouse connection I seem to be able to select an individual file, but not the whole folder.&lt;/P&gt;&lt;P&gt;If I use a Folder connection, it wants to send everything through an on-prem gateway (which makes no sense).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any insights - thanks in advance!&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 22:29:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422262#M813</guid>
      <dc:creator>Scott_Powell</dc:creator>
      <dc:date>2023-09-08T22:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422314#M814</link>
      <description>&lt;P&gt;&lt;A href="https://data-marc.com/2023/08/25/access-onelake-files-from-power-bi-desktop/" target="_blank"&gt;https://data-marc.com/2023/08/25/access-onelake-files-from-power-bi-desktop/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 01:36:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422314#M814</guid>
      <dc:creator>yjh</dc:creator>
      <dc:date>2023-09-09T01:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422383#M815</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="573254" data-lia-user-login="yjh" class="lia-mention lia-mention-user"&gt;yjh&lt;/a&gt;&amp;nbsp;I realize I wasn't clear at all. I'm not trying to load them into Power BI desktop, I'm trying to use a Dataflow Gen2 to load them into tables in the Lakehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 06:41:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422383#M815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-09T06:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422535#M818</link>
      <description>&lt;P&gt;The method is the same.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 16:31:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422535#M818</guid>
      <dc:creator>yjh</dc:creator>
      <dc:date>2023-09-09T16:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422538#M819</link>
      <description>&lt;P&gt;&lt;SPAN&gt;=Lakehouse.Content（null）&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then&amp;nbsp;Drill down.&lt;/P&gt;&lt;P&gt;sorry for my poor English.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 16:35:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3422538#M819</guid>
      <dc:creator>yjh</dc:creator>
      <dc:date>2023-09-09T16:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3464199#M932</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="535913" data-lia-user-login="Scott_Powell" class="lia-mention lia-mention-user"&gt;Scott_Powell&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Were you able to get this to work? Trying to do the same have a ton of files loaded into a folder in lakehouse and would like to use dataflow to shape them&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Zach&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 15:38:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3464199#M932</guid>
      <dc:creator>ZachRoberts</dc:creator>
      <dc:date>2023-10-06T15:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3475756#M973</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="209404" data-lia-user-login="ZachRoberts" class="lia-mention lia-mention-user"&gt;ZachRoberts&lt;/a&gt;&amp;nbsp;, unfortunately I did not find a way to do this. If you do - please let me know, we could really use this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 13:55:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3475756#M973</guid>
      <dc:creator>Scott_Powell</dc:creator>
      <dc:date>2023-10-13T13:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3475805#M974</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="535913" data-lia-user-login="Scott_Powell" class="lia-mention lia-mention-user"&gt;Scott_Powell&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wasn't able to figure out loading the files in my folder through Dataflow but ended up using a notebook to ingest the files to a table and went from there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the notebook details if you want to give it a shot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below loads all files from within a folder and removes the first row in each file (not sure if your files are delmited but below example my files are | delimited), and in the step where you can input the column names you don't have to do this for every column - you can select the columns you want to load you just have to provide the appropiate column # starting from 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cell 1&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql.functions import split, row_number, input_file_name
from pyspark.sql import Window

# Read all files from the directory into a DataFrame
df = spark.read.text("Files/Expense/*.txt")

# Add a column for the input file name
df_with_filename = df.withColumn("filename", input_file_name())

# Add a row number to each row, partitioned by the input file name
windowSpec = Window.partitionBy("filename").orderBy("value")
df_with_rownum = df_with_filename.withColumn("rownum", row_number().over(windowSpec))

# Filter out the first row from each file
df_filtered = df_with_rownum.filter(df_with_rownum.rownum &amp;gt; 1)

# Split the value column by the | delimiter
df_split = df_filtered.withColumn("split_values", split(df_filtered["value"], "\|"))

# If you know the number of columns and want to give them names, you can do so
# For example, if there are two columns:
df_final = df_split.select(
    df_split["split_values"].getItem(0).alias("Constant"),
    df_split["split_values"].getItem(1).alias("BatchId"),

)

# Show the resulting DataFrame
df_final.show()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cell 2&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;df_final.write.mode("overwrite").format("delta").saveAsTable("TableName")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 14:19:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3475805#M974</guid>
      <dc:creator>ZachRoberts</dc:creator>
      <dc:date>2023-10-13T14:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3731801#M2223</link>
      <description>&lt;P&gt;This does not work for multiple files in the same folder though, right?&amp;nbsp; You can only select a single file using this method as far as I an tell.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 22:41:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3731801#M2223</guid>
      <dc:creator>joeguicearnold</dc:creator>
      <dc:date>2024-02-28T22:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can Dataflow Gen2 read from lakehouse "Files" as a folder?</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3731834#M2224</link>
      <description>&lt;P&gt;You can use the combine files experience the same as with other file system views (SharePoint, data lake, folder and others). If you're seeing any issues with this approach please create a separate topic / thread so we can take a closer look at it&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:23:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Can-Dataflow-Gen2-read-from-lakehouse-quot-Files-quot-as-a/m-p/3731834#M2224</guid>
      <dc:creator>miguel</dc:creator>
      <dc:date>2024-02-28T23:23:54Z</dc:date>
    </item>
  </channel>
</rss>

