This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
product_set_id = 'my-product-set-1' | |
product_set_create = CloudVisionProductSetCreateOperator( | |
product_set_id=product_set_id | |
# ... | |
) | |
for x in range(0, 1000): | |
product_create = CloudVisionProductCreateOperator( | |
product_id='my-product-{}'.format(x), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DECORATORS | |
# https://realpython.com/primer-on-python-decorators/ | |
# Calling higher-order functions. | |
# A function that takes another function and extends its behaviour (without modifying it). | |
import functools | |
def my_decorator(func): | |
@functools.wraps(func) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.contrib.operators import dataproc_operator | |
from airflow.utils import dates | |
from airflow import models | |
import datetime | |
from airflow.operators import bash_operator | |
from airflow.utils.trigger_rule import TriggerRule | |
PARAMS = { | |
"user.name": "szymon", | |
"nameNode": "hdfs://localhost:8020", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.contrib.operators import dataproc_operator | |
from airflow.utils.trigger_rule import TriggerRule | |
from airflow.utils import dates | |
from airflow import models | |
from airflow.operators import bash_operator | |
import datetime | |
PARAMS = { | |
"user.name": "TODO", | |
"nameNode": "hdfs://", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.utils import dates | |
from airflow.contrib.operators import dataproc_operator | |
from airflow import models | |
from airflow.utils.trigger_rule import TriggerRule | |
from o2a_libs.el_basic_functions import * | |
from airflow.operators import bash_operator | |
import datetime | |
from o2a_libs.el_wf_functions import * | |
from airflow.operators import dummy_operator |