question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Snowflake provider not accepting private_key_file in extras

See original GitHub issue

Apache Airflow Provider(s)

snowflake

Versions of Apache Airflow Providers

2.1.1

Apache Airflow version

2.1.3 (latest released)

Operating System

centos7

Deployment

Virtualenv installation

Deployment details

Created a virtualenv, did a pip install.

What happened

I am adding the dictionary below to the extras in snowflake connections. After I click save and try to access this connection, I get a response that the password field is empty. This leads me to believe that the dictionary key is not being picked up.

{ "private_key_file": "/etc/key/key.pk8" }

According to https://github.com/snowflakedb/snowflake-connector-python/blob/master/src/snowflake/connector/connection.py, there is a KEY_PAIR_AUTHENTICATOR authenticator as well, but I am not sure if this is required to be passed as using the standard sqlalchemy I do not need to pass the authenticator.

What you expected to happen

With the private_key_file provided, the session should connect without any errors.

How to reproduce

Install apache-airflow-providers-snowflake 2.1.1

Go to connections Add Snowflake In extras field, enter the dictionary, click save.

Anything else

Looks like it might be the same issue as https://github.com/apache/airflow/pull/16735.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
weiminmeicommented, Sep 21, 2021

Hi,

On version 2.2.0b1, looks like this is addressed.

Screen Shot 2021-09-21 at 4 02 55 PM

1reaction
eladkalcommented, Sep 12, 2021

@weiminmei Can you please check if the issue still happens in 2.2.0b1 ? This is a beta release that includes https://github.com/apache/airflow/pull/17269 which should solve your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Snowflake][DSI] (20032) Required setting 'PRIV_KEY_FILE' is ...
I removed the space and I am now receiving a new error. Cannot initialize the data source object of OLE DB provider "MSDASQL"...
Read more >
How to add private_key_file to snowflake connection in airflow
When I try to add the private_key_file to the extra field (see image) in the snowflake connection however it is not correctly stored....
Read more >
How to use an encrypted private key in key pair authentication ...
When I introduced Snowflake and Terraform provider in my projects in Feb 2021, it did not support encrypted private key for key pair...
Read more >
BeamSnowflakeExamples - GitHub
This repository contains examples of using Snowflake with Apache Beam. Precisely contains batching, streaming, Dataflow template and cross-language usage ...
Read more >
Connect by SSH tunnel or IP safelist | Databases to ... - Fivetran
When you use Fivetran database connectors, you have the option to sync data by safelisting Fivetran's IP or via an SSH tunnel.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found