azure-functions-python-worker icon indicating copy to clipboard operation
azure-functions-python-worker copied to clipboard

[BUG] Invalid requirement: snowflake-connector-python[pandas]

Open c56444 opened this issue 2 years ago • 1 comments

Investigative information

Please provide the following:
  • Timestamp: 9/8/2022, 8:30:42.226 AM
  • Function App name: tavda-snowflake-naics-acct
  • Function name(s) (as appropriate): snowexample
  • Core Tools version: 3.0.4753

Repro steps

Provide the steps required to reproduce the problem:

Expected behavior

Provide a description of the expected behavior.

Function successfully updates a snowflake table

Actual behavior

Provide a description of the actual behavior observed.

After execution, the function fails indicating: Exception while executing function: Functions.SNOWExample Result: Failure Exception: ProgrammingError: 255002: 255002: Optional dependency: 'pandas' is not installed, please see the following link for install instructions: https://docs.snowflake.com/en/user-guide/python-connector-pandas.html#installation -->

Known workarounds

Provide a description of any known workarounds.

Contents of the requirements.txt file:

Provide the requirements.txt file to help us find out module related issues.

Related information

Provide any related information
  • Links to source
  • Bindings used

c56444 avatar Sep 08 '22 13:09 c56444

Repro steps

  1. Create VS Code project
  2. install requirements.txt
  3. execute locally (success)
  4. deploy to resource group
  5. trigger using ADF

Known workarounds: Use native pandas instead of snowflake connector pandas

requirements.txt azure-functions

Generated on: Python 3.9.13

asn1crypto==1.5.1 certifi==2022.6.15 cffi==1.15.1 charset-normalizer==2.1.1 cryptography==36.0.2 filelock==3.8.0 idna==3.3 oscrypto==1.3.0 pycparser==2.21 pycryptodomex==3.15.0 PyJWT==2.4.0 pyOpenSSL==22.0.0 pytz==2022.2.1 requests==2.28.1 typing_extensions==4.3.0 urllib3==1.26.12 snowflake-connector-python==2.7.12 pandas sqlalchemy snowflake-sqlalchemy snowflake-connector-python[pandas]

c56444 avatar Sep 08 '22 13:09 c56444

@c56444 Would it be possible to share a simple repo to reproduce this issue, so that we can investigate the issue easily.

ramya894 avatar Oct 25 '22 09:10 ramya894

I discovered that having 2 snowflake connector entries in the requirements.txt file, caused the issue. I removed both and replaced them with, snowflake-connector-python[pandas]==2.7.12. This loads all the required snowflake packages.

c56444 avatar Oct 25 '22 13:10 c56444