Comments (8)
UPDATE SOLUTION:
creating table is not necessary, you can use parameter time_partitioning={'type': 'DAY'},
to avoiding this error
from airflow-tutorial.
Hi @imamdigmi,
I just re-ran the bigquery_github_trends
dag, and all the tasks ran through without any errors. Can you check if you use the correct Airflow version?
Maybe trying this command to rebuild the image for the bigquery tutorial:
docker-compose -f docker-compose-gcloud.yml up --build
Let me know if you still have the error.
from airflow-tutorial.
Hi @tuanavu thanks for your fast response, actually I use the latest stable version of Airflow (1.10.2) and I use Airflow on my local machine with Anaconda, which means that without docker container, and I wrote the DAG and other files by myself, I can make sure there is no problem with my DAG or my Airflow, I confirmed it in the following way:
python $DAGS_FOLDER/bigquery_github_trends.py
there is no error, and I test every single tasks with the following command:
$ airflow test bigquery_github_trends bq_check_githubarchive_day 2018-12-02
$ airflow test bigquery_github_trends bq_check_hackernews_full 2018-12-02
eventually, I stuck on testing the third tasks with the above errors, but, I follow this instruction from how-to-aggregate-data-for-bigquery-using-apache-airflow, which is I should make empty table on BigQuery with the following command on Google Console Shell:
$ bq mk --time_partitioning_type=DAY my-project:github_trends.github_daily_metrics
$ bq mk --time_partitioning_type=DAY my-project:github_trends.github_agg
$ bq mk --time_partitioning_type=DAY my-project:github_trends.hackernews_agg
$ bq mk --time_partitioning_type=DAY my-project:github_trends.hackernews_github_agg
After that, I re-ran the third test with:
airflow test bigquery_github_trends bq_write_to_github_daily_metrics 2018-12-02
and there is no error appears, bu those tables still empty which which means that the data is not stored in the destination table, although all the tasks run successfully.
Any advice I'll appreciate it! thanks
from airflow-tutorial.
Hi @imamdigmi,
I understand your frustration. That is problem with open source project, and why I have to use docker for version control. Because different Airflow version may have a different version of the Operators that makes the tasks fail.
The Airflow version used in this tutorial is 1.10.1
. I will take a look and see if I can reproduce your errors in the new Airflow version 1.10.2
.
from airflow-tutorial.
Thank you very much @tuanavu for your willingness to help me
from airflow-tutorial.
Hi @tuanavu I just re-ran the DAGs using Airflow version 1.10.1, it's successfully create partition table automatically, bu unfortunately, the data still not stored in destination table (empty)
from airflow-tutorial.
Hi @imamdigmi,
I believe the reason your query result is not stored in the destination table is because of this setting partition_expiration_days=3
. This means all partitions older than 3 days should expire and be deleted. So when you try to run a test on 2018-12-02, which is older than 3 days ago, the data expired immediately after inserted to the table.
Try to delete and recreate the partitioned table without the partition_expiration_days
. Or pick a date in the date range of your partition_expiration_days
, and you should see the output in the destination table.
from airflow-tutorial.
SOLVED! thanks @tuanavu ! but I still wondering, why in Airflow 1.10.2 I have to create table first, while in 1.10.1 version this automatically created when Airflow execute a task.
from airflow-tutorial.
Related Issues (20)
- Broken DAG: [/usr/local/airflow/dags/example_variables.py] 'Variable example_variables_config does not exist' HOT 2
- Problem to create an user
- FileNotFoundError: [Errno 2] No such file or directory while running docker-compose up -d HOT 1
- failed to solve with frontend dockerfile.v0: failed to read dockerfile HOT 1
- Error executing docker-compose up -d HOT 1
- Adding Scripts HOT 1
- Docker-compose up Error (Failed to build webserver) HOT 3
- docker-compose up -d error HOT 9
- Version prerequisites and updated docker-compose file to run this repo
- docker-compose up error. Couldn't create the network. HOT 1
- webserver_1 | NameError: name '_mysql' is not defined HOT 14
- webserver_1 | ModuleNotFoundError: No module named 'wtforms.compat' HOT 2
- webserver install not work HOT 1
- Airflow
- Cannot start service webserver: error while creating mount source path HOT 1
- couldn't do docker compose up on mac m1
- webserver-1 keep crashing HOT 1
- Run error with gcloud
- getting following error when i tried to start the docker container for the tutorial HOT 3
- ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.7/site-packages/markupsafe/__init__.py) HOT 2
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-tutorial.