<?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: Write data from snowflake (oauth) to lakehouse in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4307087#M5419</link>
    <description>&lt;P&gt;After investigation with MS and Snowflake support it ended with the workaround mentioned in this topic:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/No-CA-bundle-file-is-found-in-the-system-Set-REQUESTS-CA-BUNDLE/m-p/4233377" target="_blank"&gt;Solved: Re: No CA bundle file is found in the system. Set ... - Microsoft Fabric Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error is special to MS Fabric, as it does not occur in a local test&lt;/P&gt;</description>
    <pubDate>Fri, 29 Nov 2024 06:56:52 GMT</pubDate>
    <dc:creator>cw88</dc:creator>
    <dc:date>2024-11-29T06:56:52Z</dc:date>
    <item>
      <title>Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4286204#M5221</link>
      <description>&lt;P&gt;I try to get data from snowflake (with oauth authentication) and write it to the default lakehouse with Pyspark:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;conn = http.client.HTTPSConnection("XXX")&lt;BR /&gt;payload = f"XXX"&lt;BR /&gt;headers = {'content-type': "application/x-www-form-urlencoded"}&lt;BR /&gt;conn.request("POST", "/oauth/token", payload, headers)&lt;BR /&gt;res = conn.getresponse()&lt;BR /&gt;data = res.read()&lt;BR /&gt;&lt;BR /&gt;json_data = json.loads(data)&lt;BR /&gt;TOKEN = json_data["access_token"]&lt;BR /&gt;conn = sf.connect(account="XXX",&lt;BR /&gt;user=CLIENT_ID + "@clients",&lt;BR /&gt;authenticator="oauth",&lt;BR /&gt;token=TOKEN,&lt;BR /&gt;database="XXX",&lt;BR /&gt;schema="XXX",&lt;BR /&gt;warehouse="XXX")&lt;BR /&gt;cur = conn.cursor()&lt;BR /&gt;cur.execute(pSqlquery)&lt;BR /&gt;&lt;BR /&gt;df = cur.fetch_pandas_all()&lt;BR /&gt;spark_df = spark.createDataFrame(df)&lt;BR /&gt;&lt;BR /&gt;# Print the DataFrame&lt;BR /&gt;spark_df.write.mode("overwrite").format("delta").saveAsTable(pLakehousedestinationtable)&lt;BR /&gt;&lt;BR /&gt;# Close the cursor and connection&lt;BR /&gt;cur.close()&lt;BR /&gt;conn.close()&lt;/PRE&gt;&lt;P&gt;When i limit the query to 100 rows everything works fine.&amp;nbsp;But if i want to load &amp;gt; 800 rows, i get the following error:&lt;/P&gt;&lt;PRE&gt;No CA bundle file is found in the system. Set REQUESTS_CA_BUNDLE to the file.&lt;BR /&gt;Failed to fetch the large result set batch 01b8638a-0000-9655-0020-6a8300058006_0%2Fmain%2Fdata_0_0_1 for the 1 th time, backing off for 1s for the reason: '254007: The certificate is revoked or could not be validated: hostname=rhoyejsfcb1stg.blob.core.windows.net'&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/result_batch.py", line 332, in _download&lt;BR /&gt;response = session.request("get", **request_data)&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/requests/sessions.py", line 589, in request&lt;BR /&gt;resp = self.send(prep, **send_kwargs)&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/requests/sessions.py", line 703, in send&lt;BR /&gt;r = adapter.send(request, **kwargs)&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/requests/adapters.py", line 486, in send&lt;BR /&gt;resp = conn.urlopen(&lt;BR /&gt;^^^^^^^^^^^^^&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/connectionpool.py", line 715, in urlopen&lt;BR /&gt;httplib_response = self._make_request(&lt;BR /&gt;^^^^^^^^^^^^^^^^^^^&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/connectionpool.py", line 404, in _make_request&lt;BR /&gt;self._validate_conn(conn)&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/connectionpool.py", line 1058, in _validate_conn&lt;BR /&gt;conn.connect()&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/connection.py", line 419, in connect&lt;BR /&gt;self.sock = ssl_wrap_socket(&lt;BR /&gt;^^^^^^^^^^^^^^^^&lt;BR /&gt;File "/home/trusted-service-user/cluster-env/clonedenv/lib/python3.11/site-packages/snowflake/connector/ssl_wrap_socket.py", line 93, in ssl_wrap_socket_with_ocsp&lt;BR /&gt;raise OperationalError(&lt;BR /&gt;snowflake.connector.errors.OperationalError: 254007: The certificate is revoked or could not be validated: hostname=rhoyejsfcb1stg.blob.core.windows.net&lt;/PRE&gt;&lt;P&gt;Does anyone have an idea what the problem could be?&lt;/P&gt;&lt;P&gt;I use snowflake-connector-python Version 3.12.3 as public library in the environment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 14:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4286204#M5221</guid>
      <dc:creator>cw88</dc:creator>
      <dc:date>2024-11-15T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4286579#M5225</link>
      <description>&lt;P&gt;I came across this other post also mentioning the CA error. Does this also work for you:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/No-CA-bundle-file-is-found-in-the-system-Set-REQUESTS-CA-BUNDLE/m-p/4216320" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Data-Science/No-CA-bundle-file-is-found-in-the-system-Set-REQUESTS-CA-BUNDLE/m-p/4216320&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 19:48:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4286579#M5225</guid>
      <dc:creator>FabianSchut</dc:creator>
      <dc:date>2024-11-15T19:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4288038#M5232</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="577765" data-lia-user-login="cw88" class="lia-mention lia-mention-user"&gt;cw88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Have you checked the data size about these records? I'd like to suggest you check them if they meet the 16 Mb size limit of the snowflake database:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/71563345/what-is-max-row-size-of-a-table-in-snowflake-database" target="_blank"&gt;What is max row size of a table in Snowflake Database? - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 03:01:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4288038#M5232</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-18T03:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4288865#M5239</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="701977" data-lia-user-login="FabianSchut" class="lia-mention lia-mention-user"&gt;FabianSchut&lt;/a&gt;&amp;nbsp;, CA is not the problem. Problem is the "&lt;EM&gt;Failed to fetch the large result set batch ...&lt;/EM&gt;" error.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 12:30:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4288865#M5239</guid>
      <dc:creator>cw88</dc:creator>
      <dc:date>2024-11-18T12:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4288871#M5240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;, how can i check this? It is an external snowflake database, we have only a reading access to the db.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 12:32:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4288871#M5240</guid>
      <dc:creator>cw88</dc:creator>
      <dc:date>2024-11-18T12:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4289956#M5246</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="577765" data-lia-user-login="cw88" class="lia-mention lia-mention-user"&gt;cw88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I mean you can check the reuslt table data size in the lakehouse.&lt;BR /&gt;As you said, larget than 800 rows is a target that may triggered the issue, you can try to get less than 800 rows and check the file data size in lakehosue. (you can right-click on the delta table and choose 'view files' to show the 'files view' in the list)&lt;/P&gt;
&lt;P&gt;In addition, you can also use notebook with mssparkutils&amp;nbsp;library&amp;nbsp;to achieve these:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/76962113/microsoft-fabric-lakehouse-size-and-table-sizes" target="_blank"&gt;pyspark - Microsoft Fabric Lakehouse size and table sizes - Stack Overflow&lt;/A&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 02:36:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4289956#M5246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-19T02:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4291063#M5254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;data size is 16 KB, so it should not be the problem &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 12:48:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4291063#M5254</guid>
      <dc:creator>cw88</dc:creator>
      <dc:date>2024-11-19T12:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4294943#M5301</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="577765" data-lia-user-login="cw88" class="lia-mention lia-mention-user"&gt;cw88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Did any changes or update that applied to the credentials you used?&amp;nbsp;How long did these operation processed? BTW, how did you configure the spark session and time out? Can you please share some more detail?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 09:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4294943#M5301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-21T09:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4296911#M5313</link>
      <description>&lt;P&gt;hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did any changes or update that applied to the credentials you used? --&amp;gt; No&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How long did these operation processed? --&amp;gt; Processing takes 2-3 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BTW, how did you configure the spark session and time out? Can you please share some more detail? --&amp;gt; No custom settings&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2024 09:07:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4296911#M5313</guid>
      <dc:creator>cw88</dc:creator>
      <dc:date>2024-11-22T09:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4303609#M5380</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="577765" data-lia-user-login="cw88" class="lia-mention lia-mention-user"&gt;cw88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It seems like nothing special changes on your configurations.&lt;BR /&gt;For this scenario, I suppose this may related to the http.client method. Have you tried to other methods(e.g. snowflake.connector) or data driver(e.g. jdbc) to getting data from snowflake?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 07:22:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4303609#M5380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-27T07:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook: Write data from snowflake (oauth) to lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4307087#M5419</link>
      <description>&lt;P&gt;After investigation with MS and Snowflake support it ended with the workaround mentioned in this topic:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/No-CA-bundle-file-is-found-in-the-system-Set-REQUESTS-CA-BUNDLE/m-p/4233377" target="_blank"&gt;Solved: Re: No CA bundle file is found in the system. Set ... - Microsoft Fabric Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error is special to MS Fabric, as it does not occur in a local test&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2024 06:56:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Notebook-Write-data-from-snowflake-oauth-to-lakehouse/m-p/4307087#M5419</guid>
      <dc:creator>cw88</dc:creator>
      <dc:date>2024-11-29T06:56:52Z</dc:date>
    </item>
  </channel>
</rss>

