Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6.7k
cleanup: Upgrade Composer samples to Airflow 2.0#5782
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
442e4bc1358f275f99c943b7c1195a73d13861a7aabb69630141273714943c4f3cc1668ebece895c842bcdc0fccc9db1ee916823db1b4f21c8f09363a33687127379c2f31bf850d4b775c681f4f7bf625466755a6b72bb7be47adf6f431485fbad11f9447fadffb45a7574007File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Copyright 2021 Google LLC | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| import os | ||
| import pytest | ||
| # this fixture initializes the Airflow DB once per session | ||
| # it is used by DAGs in this blog post code only | ||
| @pytest.fixture(scope="session") | ||
| def airflow_database(): | ||
| import airflow.utils.db | ||
| # We use separate directory for local db path per session | ||
| # by setting AIRFLOW_HOME env var, which is done in noxfile_config.py. | ||
| assert('AIRFLOW_HOME' in os.environ) | ||
| airflow_home = os.environ["AIRFLOW_HOME"] | ||
| airflow_db = f"{airflow_home}/airflow.db" | ||
| # reset both resets and initializes a new database | ||
| airflow.utils.db.resetdb(rbac=None) | ||
| # Making sure we are using a data file there. | ||
| assert(os.path.isfile(airflow_db)) |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| Source, Target | ||
| nyc-tlc:green.trips_2014,nyc_tlc_EU.trips_2014 | ||
| nyc-tlc:green.trips_2015,nyc_tlc_EU.trips_2015 | ||
| nyc-tlc.green.trips_2014,nyc_tlc_EU.trips_2014 | ||
| nyc-tlc.green.trips_2015,nyc_tlc_EU.trips_2015 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.