Am using Azure Synapse in combination with jupyter notebooks:
Many of my jupyter notebooks import some custom python scripts like the util-import:
However, there's no option hold *.py files in Azure Synapse. Always when i use the import functionalty, the *.py is transformed to a notebook (On laptop it was util.py, after Synapse import it's a notebook):
How can custom *.py files be used in Azure Synapse Notebooks, without transforming them from *.py to notebook?
CodePudding user response:
There are several options for adding python to Synapse. You can manage them at the workspace, pool, or session level. The method I've had the most success with is loading from PyPi to a Spark Pool, but you can also upload Wheel or JAR files to your workspace and reference those in your notebooks. One caveat on using PyPi is that if the package has a dependency on C library packages, Synapse won't load it into your pool.