Reputation: 31
I deployed Python Azure Function that runs on Linux App Service Plan. In Python code, I call BCP command ultility to import data to MSSQL. But the problem is BCP not in the PATH environment variable so it gave me an error:
-bash: bcp command not found.
I use Kudu(root privilege) to connect to App Service Plan to register the PATH and call successfully from terminal but somehow Python cannot call it though Subprocess. So, how do I register the PATH variable to Azure app Service plan and Python can call it throught SubProcess?
Thanks.
Upvotes: 2
Views: 339
Reputation: 222592
You need to install the command-line tools.
To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file
Upvotes: 2