Hi @SaiSekhar, MahasivaRavi (Philadelphia)
It seems like the error you are encountering, ModuleNotFoundError: No module named 'country_converter'
, indicates that the country_converter
library is not available in the Synapse environment where you're trying to write the data as a Delta file.To resolve this issue, you'll need to ensure that the country_converter
library is installed and accessible within your Spark pool or environment.
- In Azure Synapse Analytics, you need to install the
country_converter
library on your Spark pool. - The error you're seeing suggests that the module is missing, so we need to install it in the environment where the notebook is being executed.
- If
country_converter
is not available in the default packages, download the library's.whl
file or.tar.gz
from PyPI. - In Synapse Studio, go to Manage > Apache Spark Pools > Packages and upload the
.whl
or.tar.gz
file as per below. - Attach the library to your Spark pool and restart the pool.
- Use the following test code to verify if the
country_converter
module is available: - Once the library is installed and the Spark pool is restarted, try executing the notebook again. The error should no longer appear when you're trying to write the data as Delta.
If the issue persists, please share the specifics of your Synapse environment (such as version or custom configurations), and I can assist you further.