Last active
March 19, 2019 10:22
-
-
Save tszumowski/6b14d8f8274d4be1033d83a8ac30973a to your computer and use it in GitHub Desktop.
Airflow DatastoreExportOperator Snippet
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
class DatastoreExportOperator(BaseOperator): | |
""" (...) """ | |
@apply_defaults | |
def __init__(self, | |
bucket, | |
namespace=None, | |
datastore_conn_id='google_cloud_default', | |
(...) | |
overwrite_existing=False, | |
*args, | |
**kwargs): | |
super(DatastoreExportOperator, self).__init__(*args, **kwargs) | |
self.datastore_conn_id = datastore_conn_id | |
(...) | |
if kwargs.get('xcom_push') is not None: | |
raise AirflowException("'xcom_push' was deprecated, use 'BaseOperator.do_xcom_push' instead") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference link