I’m unable to use Python models with dbt-core. I run into a a SSL certificate verify failure when communicating with my Databricks instance. SQL models work fine.
What I’ve already tried
Creating simple Python models (doesn’t work)
Creating SQL models (does work)
Disabling ssl_verify on my conda configuration file
Some example code or error messages
HTTPSConnectionPool(host=‘<databricks_domain>’, port=443): Max retries exceeded with url: /api/1.2/contexts/create (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)’)))
So I had to import CA certificates onto my machine, then reference them in my pip.ini file - this allowed me to install python-certifi-win32 which removed the SSL error from my python models.
While this isn’t necessarily a dbt issue, it is interesting that SQL models do not encounter this issue (maybe they are using a different API?) I do think dbt debug needs to be updated to reflect this kind of issue.