Comments (12)
As Tamara noted... snowflake connector changed in 4.0.2: https://airflow.apache.org/docs/apache-airflow-providers-snowflake/stable/index.html#id2. Will post a PR here shortly.
from airflow-provider-great-expectations.
@Bowrna I'm releasing a fix from @mpgreg 's PR, this should resolve the issue.
I don't feel we've come to a resolution about the account key error. I do think that as long as a Snowflake account is provided to the connection, this shouldn't be a problem in any Airflow version.
from airflow-provider-great-expectations.
Hi @Bowrna I just released version 0.2.5 with this fix. Will close the issue!
from airflow-provider-great-expectations.
The above issue occur in the latest version of the great-expectations-operator too:
Following is the log trace for it
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/great_expectations_provider/operators/great_expectations.py", line 474, in execute
self.build_runtime_datasources()
File "/usr/local/lib/python3.8/site-packages/great_expectations_provider/operators/great_expectations.py", line 383, in build_runtime_datasources
self.datasource = self.build_runtime_sql_datasource_config_from_conn_id()
File "/usr/local/lib/python3.8/site-packages/great_expectations_provider/operators/great_expectations.py", line 320, in build_runtime_sql_datasource_config_from_conn_id
"connection_string": self.make_connection_string(),
File "/usr/local/lib/python3.8/site-packages/great_expectations_provider/operators/great_expectations.py", line 255, in make_connection_string
"account", self.conn.extra_dejson["extra__snowflake__account"]
KeyError: 'extra__snowflake__account'
from airflow-provider-great-expectations.
#84 should have closed this issue - can you please confirm you're using the operator version 0.2.4?
from airflow-provider-great-expectations.
@Bowrna can you confirm this is still an issue with the newest version? Thanks
from airflow-provider-great-expectations.
@denimalpaca this issue is persisting in the version airflow-provider-great-expectations==0.2.4
I have verified it again
from airflow-provider-great-expectations.
I have verified the code in this link https://github.com/astronomer/airflow-provider-great-expectations/blob/main/great_expectations_provider/operators/great_expectations.py#L253-L266
snowflake_account = self.conn.extra_dejson.get(
"account", self.conn.extra_dejson["extra__snowflake__account"]
)
in latest version of airflow, self.conn.extra_dejson dict doesn't have the key "extra__snowflake__account". so the above code starts to throw error.
We could handle it by changing the code like below
snowflake_account = self.conn.extra_dejson.get(
"extra__snowflake__account", self.conn.extra_dejson.get("account", None)
)
from airflow-provider-great-expectations.
I think that code should throw and error when no account is specified; do you think the wrong error is being thrown? The key error KeyError: 'extra__snowflake__account'
should only occur now if no account is given. I don't think your fix would provide the correct behavior, as the error would then be propagated to the Great Expectations libraries when an invalid URI is passed.
Are you unable to use the operator because of the current behavior?
from airflow-provider-great-expectations.
I think that code should throw and error when no account is specified; do you think the wrong error is being thrown? The key error
KeyError: 'extra__snowflake__account'
should only occur now if no account is given. I don't think your fix would provide the correct behavior, as the error would then be propagated to the Great Expectations libraries when an invalid URI is passed.Are you unable to use the operator because of the current behavior?
Yes, i am unable to use the operator because of the current behavior. I had to run the snowflake query in separate task and pass the result to the GX operator rather than passing the snowflake query directly to GX operator
from airflow-provider-great-expectations.
PR for this #95
from airflow-provider-great-expectations.
thanks @denimalpaca
yes this fix should solve the issue
from airflow-provider-great-expectations.
Related Issues (20)
- Snowflake Region should be optional
- Add Trino support HOT 1
- GreatExpectationsOperator is overriding database name with schema HOT 2
- Feature Request: pass parameters from Airflow to GE Checkpoint
- Feature Request: run EXPERIMENTAL expectation (from great_expectations_experimental library) from Airflow? HOT 1
- Parsing data_asset_name should account for fully qualified table name.
- How to pass create_temp_table: False to SqlAlchemy? HOT 3
- Test failure due to `apache-airflow-providers-snowflake` 4.3.1
- Passing value_set through Evaluation Parameters crashes if list size is more than 100
- Cannot run validation on BigQuery HOT 2
- Connection to Athena via `conn_id`
- Case-sensitive code for ODBC Driver extras
- Feature request: Way to pass in schema name to overwrite the schema pulled from the conn_id HOT 2
- Feature request: Add templating for attribute dataframe_to_validate. HOT 1
- Snowflake connection failure when only using the Airflow UI fields to set the connection HOT 1
- collision with another protobuf version HOT 7
- add support for Athena (aws_default) airflow connection HOT 7
- GreatExpectationsOperator ignoring schema from connection HOT 1
- Add schema to template fields
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airflow-provider-great-expectations.