-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-783113: Not able to connect from jupyter notebook #405
Comments
I don't see |
@sfc-gh-mkeller I did try both pacakges:
|
Alright, I was able to find the issue. I also wanted to ask, how can we add a guide to connect directly from Jupyter (with JupySQL, not sqlalchemy)? |
bumped into this one while reviewing old issues. good to hear it was resolved for you. regarding adding examples. JupySQL already seems to have a guide for Snowflake in their docs (which is I think the right place for it) |
Please answer these questions before submitting your issue. Thanks!
Python 3.9.12 (main, Apr 5 2022, 01:52:34)
[Clang 12.0.0 ]`
macOS-12.4-arm64-arm-64bit`
pip freeze
)?alembic==1.8.1
ansiwrap==0.8.4
anyio==3.6.2
appnope==0.1.3
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.0.8
attrs==22.1.0
autoviml==0.1.710
Babel==2.10.3
backcall==0.2.0
backoff==1.11.1
beautifulsoup4==4.11.1
bing-image-urls==0.1.5
black==22.10.0
bleach==5.0.1
boto3==1.24.85
botocore==1.27.85
brotlipy==0.7.0
catboost==1.1.1
certifi==2022.9.14
cffi @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/croot-jgj0vmyy/cffi_1642701117808/work
chardet==3.0.4
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
click==8.1.3
cloudpickle==2.2.0
colorama==0.4.6
conda==4.12.0
conda-content-trust @ file:///tmp/build/80754af9/conda-content-trust_1617045594566/work
conda-package-handling @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_croot-4sc96bd_/conda-package-handling_1649105290173/work
contourpy==1.0.5
cryptography @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_5871d1ea-0250-4cd7-ac89-4b1e60514f5daqk8t0ow/croots/recipe/cryptography_1652101128666/work
cycler==0.11.0
databricks-cli==0.17.3
debuglater==1.4.4
debugpy==1.6.3
decorator==5.1.1
defusedxml==0.7.1
docker==6.0.0
docutils==0.19
duckdb==0.5.0
duckdb-engine==0.7.0
emoji==2.2.0
entrypoints==0.4
executing==1.1.1
fastjsonschema==2.16.2
flake8==6.0.0
flake8-black==0.3.6
Flask==2.2.2
fonttools==4.38.0
gitdb==4.0.9
GitPython==3.1.29
graphviz==0.20.1
gunicorn==20.1.0
h11==0.14.0
headerparser==0.4.0
htmlmin==0.1.12
httpcore==0.16.3
httpx==0.23.3
idna==2.10
ImageHash==4.3.1
imbalanced-ensemble==0.1.7
imbalanced-learn==0.10.1
importlib-metadata==5.0.0
invoke==1.7.1
ipykernel==6.16.2
ipynb==0.5.1
ipython==8.5.0
ipython-genutils==0.2.0
ipython-sql==0.5.0
ipywidgets==8.0.4
itsdangerous==2.1.2
jedi==0.18.1
Jinja2==3.1.2
jmespath==1.0.1
joblib==1.2.0
json5==0.9.10
jsonschema==4.16.0
jupysql==0.6.0
jupyter==1.0.0
jupyter-console==6.4.4
jupyter-server==1.21.0
jupyter_client==7.4.4
jupyter_core==4.11.2
jupyterlab==3.5.0
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.5
jupyterlab_server==2.16.1
jupytext==1.14.4
kiwisolver==1.4.4
llvmlite==0.39.1
logzero==1.7.0
lxml==4.9.2
Mako==1.2.3
markdown-it-py==2.1.0
MarkupSafe==2.1.1
matplotlib==3.6.2
matplotlib-inline==0.1.6
mccabe==0.7.0
mdit-py-plugins==0.3.3
mdurl==0.1.2
memory-profiler==0.60.0
mistune==2.0.4
mlflow==1.30.0
monotonic==1.6
moto==4.0.6
multimethod==1.9.1
mypy-extensions==0.4.3
nbclassic==0.4.5
nbclient==0.7.0
nbconvert==7.2.8
nbformat==5.7.0
nbqa==1.6.3
ndjson==0.3.1
nest-asyncio==1.5.6
networkx==2.8.8
nltk==3.8.1
notebook==6.5.1
notebook_shim==0.2.0
numba==0.56.4
numpy==1.23.4
oauthlib==3.2.2
packaging==21.3
pandas==1.5.3
pandas-profiling==3.6.1
pandocfilters==1.5.0
papermill==2.4.0
parso==0.8.3
pathspec==0.10.1
patsy==0.5.3
pexpect==4.8.0
phik==0.12.3
pickleshare==0.7.5
Pillow==9.2.0
pkgmt==0.2.5
platformdirs==2.5.2
ploomber-core==0.2.6
ploomber-engine==0.0.24
plotly==5.13.0
posthog==2.1.2
prettytable==0.7.2
prometheus-client==0.15.0
prometheus-flask-exporter==0.20.3
prompt-toolkit==3.0.31
protobuf==4.21.8
psutil==5.9.3
psycopg2-binary==2.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==10.0.1
pycodestyle==2.10.0
pycosat==0.6.3
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pydantic==1.10.2
pyflakes==3.0.1
Pygments==2.14.0
PyJWT==2.6.0
pylance==0.2.7
pyOpenSSL @ file:///opt/conda/conda-bld/pyopenssl_1643788558760/work
pyparsing==3.0.9
pyrsistent==0.18.1
PySocks @ file:///Users/ktietz/Code/oss/ci_pkgs/pysocks_1626781349491/work
python-dateutil==2.8.2
pytz==2022.4
PyWavelets==1.4.1
PyYAML==6.0
pyzmq==24.0.1
qtconsole==5.4.0
QtPy==2.3.0
querystring-parser==1.2.4
readme-renderer==24.0
regex==2022.10.31
requests==2.24.0
responses==0.21.0
rfc3986==1.5.0
rich==13.3.1
ruamel-yaml-conda @ file:///Users/ktietz/demo/mc3/conda-bld/ruamel_yaml_1629464769899/work
s3transfer==0.6.0
scikit-learn==1.2.0
scipy==1.9.3
seaborn==0.12.1
Send2Trash==1.8.0
shap==0.41.0
six @ file:///tmp/build/80754af9/six_1644875935023/work
sklearn-evaluation==0.8.4
slicer==0.0.7
smmap==5.0.0
sniffio==1.3.0
soupsieve==2.3.2.post1
SQLAlchemy==1.4.46
sqlparse==0.4.3
stack-data==0.5.1
statsmodels==0.13.5
svglue==0.3.0
tabulate==0.9.0
tangled-up-in-unicode==0.2.0
tenacity==8.1.0
terminado==0.17.0
testpath==0.6.0
textblob==0.17.1
textwrap3==0.9.2
threadpoolctl==3.1.0
tinycss2==1.2.1
tokenize-rt==5.0.0
toml==0.10.2
tomli==2.0.1
tornado==6.2
tqdm @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_d8374dd1-2388-4771-b0ef-a205a18076f0p40h0nwh/croots/recipe/tqdm_1650891080348/work
traitlets==5.5.0
typeguard==2.13.3
typing_extensions==4.4.0
urllib3==1.25.11
vaderSentiment==3.3.2
visions==0.7.5
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.4.1
Werkzeug==2.2.2
wget==3.2
wheel-filename==1.4.1
wheel-inspect==1.6.0
widgetsnbextension==4.0.5
xgboost==1.7.3
xlrd==2.0.1
xmltodict==0.13.0
yapf==0.32.0
yellowbrick==1.5
zipp==3.10.0
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from snowflake.sqlalchemy import URL
Later I tried connecting via sql alchemy:
I was expecting to connect and start querying.
Can you set logging to DEBUG and collect the logs?
File :2, in create_engine(url, **kwargs)
File ~/opt/miniconda3/lib/python3.9/site-packages/sqlalchemy/util/deprecations.py:375, in deprecated_params..decorate..warned(fn, *args, **kwargs)
368 if m in kwargs:
369 _warn_with_version(
370 messages[m],
371 versions[m],
372 version_warnings[m],
373 stacklevel=3,
374 )
--> 375 return fn(*args, **kwargs)
File ~/opt/miniconda3/lib/python3.9/site-packages/sqlalchemy/engine/create.py:522, in create_engine(url, **kwargs)
518 u = _url.make_url(url)
520 u, plugins, kwargs = u._instantiate_plugins(kwargs)
--> 522 entrypoint = u._get_entrypoint()
523 dialect_cls = entrypoint.get_dialect_cls(u)
525 if kwargs.pop("_coerce_config", False):
File ~/opt/miniconda3/lib/python3.9/site-packages/sqlalchemy/engine/url.py:662, in URL._get_entrypoint(self)
660 else:
661 name = self.drivername.replace("+", ".")
--> 662 cls = registry.load(name)
663 # check for legacy dialects that
664 # would return a module with 'dialect' as the
665 # actual class
666 if (
667 hasattr(cls, "dialect")
668 and isinstance(cls.dialect, type)
669 and issubclass(cls.dialect, Dialect)
670 ):
File ~/opt/miniconda3/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py:330, in PluginLoader.load(self, name)
328 def load(self, name):
329 if name in self.impls:
--> 330 return self.implsname
332 if self.auto_fn:
333 loader = self.auto_fn(name)
File ~/opt/miniconda3/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py:349, in PluginLoader.register..load()
348 def load():
--> 349 mod = compat.import_(modulepath)
350 for token in modulepath.split(".")[1:]:
351 mod = getattr(mod, token)
ModuleNotFoundError: No module named 'snowflake'
The text was updated successfully, but these errors were encountered: