<?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: notebook reading .csv in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121946#M5162</link>
    <description>&lt;P&gt;both Notebooks are in the same Workspace - yes&lt;BR /&gt;and both have the same Lakehouse attached as the default? - how do I check this?&lt;/P&gt;&lt;P&gt;I assume you are using the exact same code to read the .csv file; nothing different? - correct&lt;/P&gt;&lt;P&gt;Are they both running under the same spark configuration? - correct&lt;/P&gt;&lt;P&gt;Are there any libraries being loaded into 1 Notebook and not the other? - no&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2024 05:28:09 GMT</pubDate>
    <dc:creator>arkiboys2</dc:creator>
    <dc:date>2024-08-28T05:28:09Z</dc:date>
    <item>
      <title>notebook reading .csv</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4120377#M5153</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;in notebook1, I can read the .csv file into a dataframe&lt;BR /&gt;in notebook2, can not read the same .csv file. --&amp;gt; error is as per below&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is what I am doing in fabric notebook&lt;/P&gt;&lt;P&gt;path = 'Files/pathname/year=2024/month=08/day=16/xyz.csv'&lt;BR /&gt;df=spark.read.csv(path)&lt;BR /&gt;display(df)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error:&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;DIV class=""&gt;---------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;Py4JJavaError &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Traceback (most recent call last)&lt;/DIV&gt;&lt;DIV&gt;Cell In[107], line 3&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 1 #path = "Files/factor/xyz/year=" + str(yearNo) + "/month=" + monthNo + "/day=" + dayNo + "/bau_raw_v2_1.csv"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2 path = 'Files/factor/xyz/year=2024/month=08/day=16/bau_raw_v2_1.csv'&lt;/DIV&gt;&lt;DIV&gt;----&amp;gt; 3 df = spark.read.csv(path, header=True)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 4 display(df)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;File /opt/spark/python/lib/pyspark.zip/pyspark/sql/readwriter.py:727, in DataFrameReader.csv(self, path, schema, sep, encoding, quote, escape, comment, header, inferSchema, ignoreLeadingWhiteSpace, ignoreTrailingWhiteSpace, nullValue, nanValue, positiveInf, negativeInf, dateFormat, timestampFormat, maxColumns, maxCharsPerColumn, maxMalformedLogPerPartition, mode, columnNameOfCorruptRecord, multiLine, charToEscapeQuoteEscaping, samplingRatio, enforceSchema, emptyValue, locale, lineSep, pathGlobFilter, recursiveFileLookup, modifiedBefore, modifiedAfter, unescapedQuoteHandling)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 725 if type(path) == list:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 726 &amp;nbsp; &amp;nbsp; assert self._spark._sc._jvm is not None&lt;/DIV&gt;&lt;DIV&gt;--&amp;gt; 727 &amp;nbsp; &amp;nbsp; return self._df(self._jreader.csv(self._spark._sc._jvm.PythonUtils.toSeq(path)))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 728 elif isinstance(path, RDD):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 730 &amp;nbsp; &amp;nbsp; def func(iterator):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;File ~/cluster-env/trident_env/lib/python3.10/site-packages/py4j/java_gateway.py:1322, in JavaMember.__call__(self, *args)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1316 command = proto.CALL_COMMAND_NAME +\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1317 &amp;nbsp; &amp;nbsp; self.command_header +\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1318 &amp;nbsp; &amp;nbsp; args_command +\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1319 &amp;nbsp; &amp;nbsp; proto.END_COMMAND_PART&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1321 answer = self.gateway_client.send_command(command)&lt;/DIV&gt;&lt;DIV&gt;-&amp;gt; 1322 return_value = get_return_value(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1323 &amp;nbsp; &amp;nbsp; answer, self.gateway_client, self.target_id, self.name)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1325 for temp_arg in temp_args:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;1326 &amp;nbsp; &amp;nbsp; if hasattr(temp_arg, "_detach"):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;File /opt/spark/python/lib/pyspark.zip/pyspark/errors/exceptions/captured.py:169, in capture_sql_exception.&amp;lt;locals&amp;gt;.deco(*a, **kw)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 167 def deco(*a: Any, **kw: Any) -&amp;gt; Any:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 168 &amp;nbsp; &amp;nbsp; try:&lt;/DIV&gt;&lt;DIV&gt;--&amp;gt; 169 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return f(*a, **kw)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 170 &amp;nbsp; &amp;nbsp; except Py4JJavaError as e:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 171 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; converted = convert_exception(e.java_exception)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;File ~/cluster-env/trident_env/lib/python3.10/site-packages/py4j/protocol.py:326, in get_return_value(answer, gateway_client, target_id, name)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 324 value = OUTPUT_CONVERTER[type](answer[2:], gateway_client)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 325 if answer[1] == REFERENCE_TYPE:&lt;/DIV&gt;&lt;DIV&gt;--&amp;gt; 326 &amp;nbsp; &amp;nbsp; raise Py4JJavaError(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 327 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "An error occurred while calling {0}{1}{2}.\n".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 328 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; format(target_id, ".", name), value)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 329 else:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 330 &amp;nbsp; &amp;nbsp; raise Py4JError(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 331 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "An error occurred while calling {0}{1}{2}. Trace:\n{3}\n".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; 332 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; format(target_id, ".", name, value))&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Aug 2024 09:03:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4120377#M5153</guid>
      <dc:creator>arkiboys2</dc:creator>
      <dc:date>2024-08-27T09:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: notebook reading .csv</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121360#M5158</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="592286" data-lia-user-login="arkiboys2" class="lia-mention lia-mention-user"&gt;arkiboys2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume both Notebooks are in the same Workspace and both have the same Lakehouse attached as the default?&lt;/P&gt;&lt;P&gt;I assume you are using the exact same code to read the .csv file; nothing different?&lt;/P&gt;&lt;P&gt;Are they both running under the same spark configuration?&lt;/P&gt;&lt;P&gt;Are there any libraries being loaded into 1 Notebook and not the other?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 19:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121360#M5158</guid>
      <dc:creator>jwinchell40</dc:creator>
      <dc:date>2024-08-27T19:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: notebook reading .csv</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121946#M5162</link>
      <description>&lt;P&gt;both Notebooks are in the same Workspace - yes&lt;BR /&gt;and both have the same Lakehouse attached as the default? - how do I check this?&lt;/P&gt;&lt;P&gt;I assume you are using the exact same code to read the .csv file; nothing different? - correct&lt;/P&gt;&lt;P&gt;Are they both running under the same spark configuration? - correct&lt;/P&gt;&lt;P&gt;Are there any libraries being loaded into 1 Notebook and not the other? - no&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 05:28:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121946#M5162</guid>
      <dc:creator>arkiboys2</dc:creator>
      <dc:date>2024-08-28T05:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: notebook reading .csv</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121952#M5163</link>
      <description>&lt;P&gt;thank you. the problem was not having the correct lakehouse.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 05:31:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/notebook-reading-csv/m-p/4121952#M5163</guid>
      <dc:creator>arkiboys2</dc:creator>
      <dc:date>2024-08-28T05:31:25Z</dc:date>
    </item>
  </channel>
</rss>

