Snowpark - Error in writing using pandas

georgeannie
georgeannie Registered Posts: 7 ✭✭✭

Hi,

I am getting the following error when trying to convert snowpark dataframe into pandas dataframe.

Snowpark dataframe and processing works well. Conversion to pandas to store the data causes the below problem

ERROR:snowflake.connector.ocsp_snowflake:No CA bundle file is found in the system. Set REQUESTS_CA_BUNDLE to the file.ERROR:snowflake.connector.result_batch:Failed to fetch the large result set batch 01b7e962-0a07-b1bd-0000-09a929bf393e_0%2Fmain%2Fdata_0_0_3 for the 8 th time, backing off for 5s for the reason: '254007: The certificate is revoked or could not be validated: hostname=XXX.blob.core.windows.net'

Here is the code for conversion

new _df = new.toPandas()

Would appreciate any pointers to fix this issue.

Operating system used: Windoes

Best Answer

  • georgeannie
    georgeannie Registered Posts: 7 ✭✭✭
    Answer ✓

    Writing the solution to my own question if anyone else runs into this issue.

    import certifi
    import os

    dku_snowpark = DkuSnowpark()
    os.environ['REQUESTS_CA_BUNDLE'] = certifi.where()
    session = dku_snowpark.get_session(connection_name="Snowflake")

Answers

Setup Info
    Tags
      Help me…