astronomer / astro-sdk

Astro SDK allows rapid and clean development of {Extract, Load, Transform} workflows using Python and SQL, powered by Apache Airflow.
https://astro-sdk-python.rtfd.io/
Apache License 2.0
347 stars 43 forks source link

Refactor tests which rely on pre-populated Snowflake database #136

Closed tatiana closed 2 years ago

tatiana commented 2 years ago

Context At the moment (Astro 0.5.2), some Snowflake tests run using a specific table (ADOPTION_CENTER_1), which was pre-populated in the past. Recently there was a Snowflake migration which made our CI break because the table was not available in the new schema: https://github.com/astro-projects/astro/runs/5308330863?check_suite_focus=true

Acceptance criteria

dimberman commented 2 years ago

This ticket may be addressed by #139. The simplest solution to just not use adoption center data

tatiana commented 2 years ago

We are going to refactor the integration tests and this will probably stop happening.

tatiana commented 2 years ago

We were able to fetch from a legacy Snowflake DB the fixtures which are still used by legacy tests:

Adoption center 1

"2021-01-01","Dog","Stanley","3"                                                
"2021-01-01","Dog","Barney","6"
"2021-02-01","Cat","Whiskers","10"
"2021-03-01","Dog","Lila","1"
"2021-03-01","Dog","Toby","5"
"2021-04-01","Cat","Gretchen","4"
"2021-05-01","Guinea Pig","Maverick","11"
"2021-06-01","Cat","Pie","8"
"2021-07-01","Dog","Butter","12"
"2021-08-01","Dog","Peanut","2"
"2021-03-01","Cat","Fluffy","3"
"2021-04-01","Dog","Tobias","1"
"2021-04-01","Dog","Buddy","1"
"2021-04-01","Cat","Roo","2"
"2021-05-01","Guinea Pig","Piglet","2"
"2021-05-01","Cat","Ghost","3"
"2021-06-01","Dog","Ollie","4"
"2021-06-01","Dog","Eta","12"

And Adoption center 2

"2021-05-01","Cat","Dancer","3"                                                 
"2021-07-01","Dog","Prancer","1"
"2021-08-01","Dog","Comet","1"
"2021-09-01","Cat","Cupid","2"
"2021-10-01","Guinea Pig","Rudolph","4"
"2021-11-01","Cat","Spider","3"
"2021-12-01","Dog","Dasher","4"
"2021-10-01","Dog","Ettie","12"
kaxil commented 2 years ago

Is this still an issue?

utkarsharma2 commented 2 years ago

@kaxil One of the example dag uses this table - example_amazon_s3_snowflake_transform.py