Is there any other option to connect to snowflake - snowflake-connector

0 I'm a newbie to snowflake and trying to connect to the db using python but when executing the code i get this error "snowflake.connector.errors.ProgrammingError: 251005: Password is empty"

Pre steps: Install Snowflake Python connector using pip command or conda installer
are easiest as the package is installed along with dependent packages.
pip command: pip install snowflake-connector-python
conda installer command: conda install -c conda-forge snowflake-connector-python
Refer Snowflake official documentation for more details
https://docs.snowflake.com/en/user-guide/python-connector-install.html
Setting Snowflake Session Parameters -
https://docs.snowflake.com/en/user-guide/python-connector-example.html
Above link can be referred for supplying Passwords to the Python program using different ways.

Related

Installing Apache Superset on Windows Server 2019, and connecting Superset with MSSQL

How Apache Superset can be installed on Windows Server 2019? What are the steps and commands to use for installing this?
First, you need to enable Linux on Windows Server 2019. Follow the steps mentioned here:
https://learn.microsoft.com/en-us/windows/wsl/install-manual
Besides this, you also might need to have Microsoft Build Tools for Visual Studio installed on your windows computer. You may install it following the steps here:
https://www.scivision.co/python-windows-visual-c++-14-required/
Once you have both these, run the following commands in the Linux terminal mentioned here to installing Apache Superset:
source: https://superset.apache.org/docs/installation/installing-superset-from-scratch
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev
python3 -m pip install virtualenv
python3 -m venv superset
. superset/bin/activate
python3 -m pip install apache-superset
superset db upgrade
#after running above command if you get dataclass module missing error: run the following command, and then give the above command again:
pip install dataclasses
export FLASK_APP=superset
superset fab create-admin
#provide credentials
superset load_examples
superset init
superset run -p 8088 --with-threads --reload --debugger
Now you should be able to access apache superset at:
http://127.0.0.1:8088/login/
If you want to connect apache superset with MSSQL database, then you need to follow the steps mentioned here to install ODBC driver first:
https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15

how to install pip remotely using ssh

Hi I hope someone can point me in the right direction.
I am trying to upload a django project which I have developed locally on my machine and now moved the project files to a server and am trying to install django on the server.
I have Python 2.7.5 installed and accessed the server remotely using ssh (putty) I can confirm Python is installed by running the command python --version
I don't have pip installed as when i run the command pip --version
I get following notification
-bash: pip: command not found
I am new to django and python so not sure what I should do to install both django and pip.
p.s In my requirements file and when working locally I have pip and django installed correctly and all working.
Ok, lets say you are already on your remote server. First thing to do is to install pip for your version of python. You can do this via:
sudo apt-get install python-pip
From now you have pip installed. Next thing to do is to install django globally in your system:
pip install django==1.11
Please note that django 1.11 is the last version that supports
python2
Next thing to do is to create django app:
django-admin startproject test_project
And the last thing is to install virtualenv
To install libraries for each of your django projects and keep them
separate
pip install virtualenv
Also note
If you have requirements.txt file with all libs, you can do something like this on your remote server:
pip install -r requirements.txt
That will automatically install all libraries at once
First you should understand which OS you're running:
uname -a
and:
lsb_release -a
When you find the OS version, you can easily follow this guide:
https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers

Error /usr/bin/env: ‘python’: No such file or directory - installing presto on AWS EC2 instance

I unpacked the presto on AWS EC2 instance and followed the documentation on prestodb
when I run bin/launcher startI get the following error:
/usr/bin/env: ‘python’: No such file or directory
I guess documentation could mention that explicitly, but you need certain piece of software installed to run presto. This includes, but is not limited to:
Supported Java JVM
Python (i guess 2.7 would do)
For Ubuntu/Debian:
Install Python if you did not do before:
apt-get install python3
If you have python already:
whereis python3
sudo ln -s /usr/bin/python3 /usr/bin/pytho

Turn an Anaconda Python installation into a conda environment to be able to switch between different versions?

I need to use both Python 2.7, and 3.5. Ideally, I should use conda to create an alternative environment, but after using
bash Anaconda2-4.2.0-Linux-x86_64.sh
to install python 2.7, in a few minutes after downloading the shell script, then with
conda create -n py35 python=3.5 anaconda
always failed due to download time out, after more than dozen minutes of downloading numerous packages. (I'm in China, behind GFW.)
But I have no problem to install python 3.5 in a few minutes after downloading the shell script, by
bash Anaconda3-4.2.0-Linux-x86_64.sh
so I wonder if it's possible to manually turn the python 3.5 installation into a conda managed environment so that I can switch between them?
Thanks a lot for your help!
set up shadowsocks client and proxchains4, I just set up an ubuntu server .
step1:
buying or setting up a shadowsocks server
step2:
install shadowsocks client
pip install shadowsocks
step3:
install proxychains
sudo apt-get install proxychains
step4: setup and run setup
shadow socks client tutorial and
proxychains tutorial
step5:
you can use proxychains to create new env
proxychains conda create -n py35 python=3.5

Downloading and importing Google Cloud Python

I'm on their github page: https://github.com/GoogleCloudPlatform/google-cloud-python
Their first command is pip install --upgrade google-cloud
this gives me:
Collecting google-cloud
Could not find a version that satisfies the requirement google-cloud (from versions: )
No matching distribution found for google-cloud
I downloaded their SDK and which installed their google cloud SDK and I did gcloud init, but I can't seem to have their python library imported into mine. Starting python and typing:
from google.cloud import datastore
gives me an error that it doesn't exist as a module... This is all from their github so I'm not sure what I'm doing wrong
The issue is that the team is trying to transition from gcloud to google-cloud which is still somewhere incomplete.
All you need to do is install gcloud using pip and you should be fine.
Pro Tip: python -m pip install --upgrade gcloud using this command will install it for your python version.
First, make sure you have installed gcloud on your system then run the commands like this:
First: gcloud components update in your terminal.
then: pip install google-cloud
And for the import error:
I had a similar problem. Adding "--ignore-installed" to my pip command made it work for me.
This might be a bug in pip - see this page for more details: https://github.com/pypa/pip/issues/2751