| |
| |
| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>airflow.contrib.operators.gcp_transfer_operator — Airflow Documentation</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="../../../../../_static/js/modernizr.min.js"></script> |
| |
| |
| <script type="text/javascript" id="documentation_options" data-url_root="../../../../../" src="../../../../../_static/documentation_options.js"></script> |
| <script type="text/javascript" src="../../../../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../../../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../../../../_static/doctools.js"></script> |
| <script type="text/javascript" src="../../../../../_static/language_data.js"></script> |
| |
| <script type="text/javascript" src="../../../../../_static/js/theme.js"></script> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../../../../_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../../_static/pygments.css" type="text/css" /> |
| <link rel="index" title="Index" href="../../../../../genindex.html" /> |
| <link rel="search" title="Search" href="../../../../../search.html" /> |
| <link rel="next" title="airflow.contrib.operators.gcp_translate_operator" href="../gcp_translate_operator/index.html" /> |
| <link rel="prev" title="airflow.contrib.operators.gcp_sql_operator" href="../gcp_sql_operator/index.html" /> |
| |
| <script> |
| document.addEventListener('DOMContentLoaded', function() { |
| var el = document.getElementById('changelog'); |
| if (el !== null ) { |
| // [AIRFLOW-...] |
| el.innerHTML = el.innerHTML.replace( |
| /\[(AIRFLOW-[\d]+)\]/g, |
| `<a href="https://issues.apache.org/jira/browse/$1">[$1]</a>` |
| ); |
| // (#...) |
| el.innerHTML = el.innerHTML.replace( |
| /\(#([\d]+)\)/g, |
| `<a href="https://github.com/apache/airflow/pull/$1">(#$1)</a>` |
| ); |
| }; |
| }) |
| </script> |
| <style> |
| .example-header { |
| position: relative; |
| background: #9AAA7A; |
| padding: 8px 16px; |
| margin-bottom: 0; |
| } |
| .example-header--with-button { |
| padding-right: 166px; |
| } |
| .example-header:after{ |
| content: ''; |
| display: table; |
| clear: both; |
| } |
| .example-title { |
| display:block; |
| padding: 4px; |
| margin-right: 16px; |
| color: white; |
| overflow-x: auto; |
| } |
| .example-header-button { |
| top: 8px; |
| right: 16px; |
| position: absolute; |
| } |
| .example-header + .highlight-python { |
| margin-top: 0 !important; |
| } |
| .viewcode-button { |
| display: inline-block; |
| padding: 8px 16px; |
| border: 0; |
| margin: 0; |
| outline: 0; |
| border-radius: 2px; |
| -webkit-box-shadow: 0 3px 5px 0 rgba(0,0,0,.3); |
| box-shadow: 0 3px 6px 0 rgba(0,0,0,.3); |
| color: #404040; |
| background-color: #e7e7e7; |
| cursor: pointer; |
| font-size: 16px; |
| font-weight: 500; |
| line-height: 1; |
| text-decoration: none; |
| text-overflow: ellipsis; |
| overflow: hidden; |
| text-transform: uppercase; |
| -webkit-transition: background-color .2s; |
| transition: background-color .2s; |
| vertical-align: middle; |
| white-space: nowrap; |
| } |
| .viewcode-button:visited { |
| color: #404040; |
| } |
| .viewcode-button:hover, .viewcode-button:focus { |
| color: #404040; |
| background-color: #d6d6d6; |
| } |
| </style> |
| |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="../../../../../index.html" class="icon icon-home"> Airflow |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 1.10.3 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../project.html">Project</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../license.html">License</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../start.html">Quick Start</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../installation.html">Installation</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../tutorial.html">Tutorial</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../howto/index.html">How-to Guides</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../ui.html">UI / Screenshots</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../concepts.html">Concepts</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../profiling.html">Data Profiling</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../cli.html">Command Line Interface</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../scheduler.html">Scheduling & Triggers</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../plugins.html">Plugins</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../security.html">Security</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../timezone.html">Time zones</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../api.html">Experimental Rest API</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../integration.html">Integration</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../metrics.html">Metrics</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../kubernetes.html">Kubernetes</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../lineage.html">Lineage</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../changelog.html">Changelog</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../faq.html">FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../macros.html">Macros reference</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../../../index.html">API Reference</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="reference internal" href="../../../../index.html#operators">Operators</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="../../../../index.html#baseoperator">BaseOperator</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../../../../index.html#basesensoroperator">BaseSensorOperator</a></li> |
| <li class="toctree-l3 current"><a class="reference internal" href="../../../../index.html#operators-packages">Operators packages</a><ul class="current"> |
| <li class="toctree-l4"><a class="reference internal" href="../../../operators/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators</span></code></a></li> |
| <li class="toctree-l4"><a class="reference internal" href="../../../sensors/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.sensors</span></code></a></li> |
| <li class="toctree-l4 current"><a class="reference internal" href="../index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.operators</span></code></a></li> |
| <li class="toctree-l4"><a class="reference internal" href="../../sensors/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.sensors</span></code></a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#hooks">Hooks</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#executors">Executors</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#models">Models</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#core-and-community-package">Core and community package</a></li> |
| </ul> |
| </li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../../../../index.html">Airflow</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="../../../../../index.html">Docs</a> »</li> |
| |
| <li><a href="../../../../index.html">API Reference</a> »</li> |
| |
| <li><a href="../index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.operators</span></code></a> »</li> |
| |
| <li><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.operators.gcp_transfer_operator</span></code></li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../../../../../_sources/_api/airflow/contrib/operators/gcp_transfer_operator/index.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="module-airflow.contrib.operators.gcp_transfer_operator"> |
| <span id="airflow-contrib-operators-gcp-transfer-operator"></span><h1><a class="reference internal" href="#module-airflow.contrib.operators.gcp_transfer_operator" title="airflow.contrib.operators.gcp_transfer_operator"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.operators.gcp_transfer_operator</span></code></a><a class="headerlink" href="#module-airflow.contrib.operators.gcp_transfer_operator" title="Permalink to this headline">¶</a></h1> |
| <div class="section" id="module-contents"> |
| <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalink to this headline">¶</a></h2> |
| <dl class="data"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.AwsHook"> |
| <code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">AwsHook</code><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#AwsHook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.AwsHook" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">TransferJobPreprocessor</code><span class="sig-paren">(</span><em>body</em>, <em>aws_conn_id='aws_default'</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._inject_aws_credentials"> |
| <code class="descname">_inject_aws_credentials</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor._inject_aws_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._inject_aws_credentials" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._reformat_date"> |
| <code class="descname">_reformat_date</code><span class="sig-paren">(</span><em>self</em>, <em>field_key</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor._reformat_date"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._reformat_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._reformat_time"> |
| <code class="descname">_reformat_time</code><span class="sig-paren">(</span><em>self</em>, <em>field_key</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor._reformat_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._reformat_time" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._reformat_schedule"> |
| <code class="descname">_reformat_schedule</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor._reformat_schedule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._reformat_schedule" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor.process_body"> |
| <code class="descname">process_body</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor.process_body"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor.process_body" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="staticmethod"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._convert_date_to_dict"> |
| <em class="property">static </em><code class="descname">_convert_date_to_dict</code><span class="sig-paren">(</span><em>field_date</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor._convert_date_to_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._convert_date_to_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Convert native python <code class="docutils literal notranslate"><span class="pre">datetime.date</span></code> object to a format supported by the API</p> |
| </dd></dl> |
| |
| <dl class="staticmethod"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._convert_time_to_dict"> |
| <em class="property">static </em><code class="descname">_convert_time_to_dict</code><span class="sig-paren">(</span><em>time</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobPreprocessor._convert_time_to_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobPreprocessor._convert_time_to_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Convert native python <code class="docutils literal notranslate"><span class="pre">datetime.time</span></code> object to a format supported by the API</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">TransferJobValidator</code><span class="sig-paren">(</span><em>body</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator._verify_data_source"> |
| <code class="descname">_verify_data_source</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobValidator._verify_data_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator._verify_data_source" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator._restrict_aws_credentials"> |
| <code class="descname">_restrict_aws_credentials</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobValidator._restrict_aws_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator._restrict_aws_credentials" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator._restrict_empty_body"> |
| <code class="descname">_restrict_empty_body</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobValidator._restrict_empty_body"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator._restrict_empty_body" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator.validate_body"> |
| <code class="descname">validate_body</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#TransferJobValidator.validate_body"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.TransferJobValidator.validate_body" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceJobCreateOperator</code><span class="sig-paren">(</span><em>body</em>, <em>aws_conn_id='aws_default'</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobCreateOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Creates a transfer job that runs periodically.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p>This operator is NOT idempotent. If you run it many times, many transfer |
| jobs will be created in the Google Cloud Platform.</p> |
| </div> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferservicejobcreateoperator"><span class="std std-ref">GcpTransferServiceJobCreateOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>body</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – <p>(Required) The request body, as described in |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/create#request-body">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/create#request-body</a> |
| With three additional improvements:</p> |
| <ul> |
| <li><p>dates can be given in the form <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.date" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a></p></li> |
| <li><p>times can be given in the form <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.time" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.time</span></code></a></p></li> |
| <li><p>credentials to Amazon Web Service should be stored in the connection and indicated by the |
| aws_conn_id parameter</p></li> |
| </ul> |
| </p></li> |
| <li><p><strong>aws_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to retrieve credentials to |
| Amazon Web Service.</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google Cloud |
| Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['body', 'gcp_conn_id', 'aws_conn_id']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobCreateOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobCreateOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobCreateOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceJobUpdateOperator</code><span class="sig-paren">(</span><em>job_name</em>, <em>body</em>, <em>aws_conn_id='aws_default'</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobUpdateOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Updates a transfer job that runs periodically.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferservicejobupdateoperator"><span class="std std-ref">GcpTransferServiceJobUpdateOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>job_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Required) Name of the job to be updated</p></li> |
| <li><p><strong>body</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – <p>(Required) The request body, as described in |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/patch#request-body">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/patch#request-body</a> |
| With three additional improvements:</p> |
| <ul> |
| <li><p>dates can be given in the form <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.date" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a></p></li> |
| <li><p>times can be given in the form <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.time" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.time</span></code></a></p></li> |
| <li><p>credentials to Amazon Web Service should be stored in the connection and indicated by the |
| aws_conn_id parameter</p></li> |
| </ul> |
| </p></li> |
| <li><p><strong>aws_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to retrieve credentials to |
| Amazon Web Service.</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google Cloud |
| Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['job_name', 'body', 'gcp_conn_id', 'aws_conn_id']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobUpdateOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobUpdateOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobUpdateOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceJobDeleteOperator</code><span class="sig-paren">(</span><em>job_name</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>project_id=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobDeleteOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Delete a transfer job. This is a soft delete. After a transfer job is |
| deleted, the job and all the transfer executions are subject to garbage |
| collection. Transfer jobs become eligible for garbage collection |
| 30 days after soft delete.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferservicejobdeleteoperator"><span class="std std-ref">GcpTransferServiceJobDeleteOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>job_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Required) Name of the TRANSFER operation</p></li> |
| <li><p><strong>project_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Optional) the ID of the project that owns the Transfer |
| Job. If set to None or missing, the default project_id from the GCP |
| connection is used.</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google Cloud |
| Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['job_name', 'project_id', 'gcp_conn_id', 'api_version']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobDeleteOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobDeleteOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceJobDeleteOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceOperationGetOperator</code><span class="sig-paren">(</span><em>operation_name</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationGetOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Gets the latest state of a long-running operation in Google Storage Transfer |
| Service.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferserviceoperationgetoperator"><span class="std std-ref">GcpTransferServiceOperationGetOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>operation_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Required) Name of the transfer operation.</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google |
| Cloud Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['operation_name', 'gcp_conn_id']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationGetOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationGetOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationGetOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceOperationsListOperator</code><span class="sig-paren">(</span><em>filter</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationsListOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Lists long-running operations in Google Storage Transfer |
| Service that match the specified filter.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferserviceoperationslistoperator"><span class="std std-ref">GcpTransferServiceOperationsListOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>filter</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – (Required) A request filter, as described in |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/list#body.QUERY_PARAMETERS.filter">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/list#body.QUERY_PARAMETERS.filter</a></p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google |
| Cloud Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['filter', 'gcp_conn_id']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationsListOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationsListOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationsListOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceOperationPauseOperator</code><span class="sig-paren">(</span><em>operation_name</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationPauseOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Pauses a transfer operation in Google Storage Transfer Service.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferserviceoperationpauseoperator"><span class="std std-ref">GcpTransferServiceOperationPauseOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>operation_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Required) Name of the transfer operation.</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google Cloud Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['operation_name', 'gcp_conn_id', 'api_version']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationPauseOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationPauseOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationPauseOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceOperationResumeOperator</code><span class="sig-paren">(</span><em>operation_name</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>api_version='v1'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationResumeOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Resumes a transfer operation in Google Storage Transfer Service.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferserviceoperationresumeoperator"><span class="std std-ref">GcpTransferServiceOperationResumeOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>operation_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Required) Name of the transfer operation.</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google Cloud Platform.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['operation_name', 'gcp_conn_id', 'api_version']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationResumeOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationResumeOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationResumeOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GcpTransferServiceOperationCancelOperator</code><span class="sig-paren">(</span><em>operation_name</em>, <em>api_version='v1'</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationCancelOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Cancels a transfer operation in Google Storage Transfer Service.</p> |
| <div class="admonition seealso"> |
| <p class="admonition-title">See also</p> |
| <p>For more information on how to use this operator, take a look at the guide: |
| <a class="reference internal" href="../../../../../howto/operator/gcp/transfer.html#howto-operator-gcptransferserviceoperationcanceloperator"><span class="std std-ref">GcpTransferServiceOperationCancelOperator</span></a></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>operation_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – (Required) Name of the transfer operation.</p></li> |
| <li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – API version used (e.g. v1).</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The connection ID used to connect to Google |
| Cloud Platform.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['operation_name', 'gcp_conn_id', 'api_version']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationCancelOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator._validate_inputs"> |
| <code class="descname">_validate_inputs</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationCancelOperator._validate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator._validate_inputs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GcpTransferServiceOperationCancelOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">S3ToGoogleCloudStorageTransferOperator</code><span class="sig-paren">(</span><em>s3_bucket</em>, <em>gcs_bucket</em>, <em>project_id=None</em>, <em>aws_conn_id='aws_default'</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>delegate_to=None</em>, <em>description=None</em>, <em>schedule=None</em>, <em>object_conditions=None</em>, <em>transfer_options=None</em>, <em>wait=True</em>, <em>timeout=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#S3ToGoogleCloudStorageTransferOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Synchronizes an S3 bucket with a Google Cloud Storage bucket using the |
| GCP Storage Transfer Service.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p>This operator is NOT idempotent. If you run it many times, many transfer |
| jobs will be created in the Google Cloud Platform.</p> |
| </div> |
| <p><strong>Example</strong>:</p> |
| <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">s3_to_gcs_transfer_op</span> <span class="o">=</span> <span class="n">S3ToGoogleCloudStorageTransferOperator</span><span class="p">(</span> |
| <span class="n">task_id</span><span class="o">=</span><span class="s1">'s3_to_gcs_transfer_example'</span><span class="p">,</span> |
| <span class="n">s3_bucket</span><span class="o">=</span><span class="s1">'my-s3-bucket'</span><span class="p">,</span> |
| <span class="n">project_id</span><span class="o">=</span><span class="s1">'my-gcp-project'</span><span class="p">,</span> |
| <span class="n">gcs_bucket</span><span class="o">=</span><span class="s1">'my-gcs-bucket'</span><span class="p">,</span> |
| <span class="n">dag</span><span class="o">=</span><span class="n">my_dag</span><span class="p">)</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>s3_bucket</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The S3 bucket where to find the objects. (templated)</p></li> |
| <li><p><strong>gcs_bucket</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The destination Google Cloud Storage bucket |
| where you want to store the files. (templated)</p></li> |
| <li><p><strong>project_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Optional ID of the Google Cloud Platform Console project that |
| owns the job</p></li> |
| <li><p><strong>aws_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The source S3 connection</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The destination connection ID to use |
| when connecting to Google Cloud Storage.</p></li> |
| <li><p><strong>delegate_to</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The account to impersonate, if any. |
| For this to work, the service account making the request must have |
| domain-wide delegation enabled.</p></li> |
| <li><p><strong>description</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Optional transfer service job description</p></li> |
| <li><p><strong>schedule</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – <p>Optional transfer service schedule; |
| If not set, run transfer job once as soon as the operator runs |
| The format is described |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs</a>. |
| With two additional improvements:</p> |
| <ul> |
| <li><p>dates they can be passed as <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.date" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a></p></li> |
| <li><p>times they can be passed as <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.time" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.time</span></code></a></p></li> |
| </ul> |
| </p></li> |
| <li><p><strong>object_conditions</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – Optional transfer service object conditions; see |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec</a></p></li> |
| <li><p><strong>transfer_options</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – Optional transfer service transfer options; see |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec</a></p></li> |
| <li><p><strong>wait</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Wait for transfer to finish</p></li> |
| <li><p><strong>timeout</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) – Time to wait for the operation to end in seconds</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['gcp_conn_id', 's3_bucket', 'gcs_bucket', 'description', 'object_conditions']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#S3ToGoogleCloudStorageTransferOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator.ui_color"> |
| <code class="descname">ui_color</code><em class="property"> = #e09411</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#S3ToGoogleCloudStorageTransferOperator.ui_color"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator.ui_color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#S3ToGoogleCloudStorageTransferOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator._create_body"> |
| <code class="descname">_create_body</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#S3ToGoogleCloudStorageTransferOperator._create_body"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.S3ToGoogleCloudStorageTransferOperator._create_body" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.contrib.operators.gcp_transfer_operator.</code><code class="descname">GoogleCloudStorageToGoogleCloudStorageTransferOperator</code><span class="sig-paren">(</span><em>source_bucket</em>, <em>destination_bucket</em>, <em>project_id=None</em>, <em>gcp_conn_id='google_cloud_default'</em>, <em>delegate_to=None</em>, <em>description=None</em>, <em>schedule=None</em>, <em>object_conditions=None</em>, <em>transfer_options=None</em>, <em>wait=True</em>, <em>timeout=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GoogleCloudStorageToGoogleCloudStorageTransferOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../../../models/index.html#airflow.models.BaseOperator" title="airflow.models.BaseOperator"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.BaseOperator</span></code></a></p> |
| <p>Copies objects from a bucket to another using the GCP Storage Transfer |
| Service.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p>This operator is NOT idempotent. If you run it many times, many transfer |
| jobs will be created in the Google Cloud Platform.</p> |
| </div> |
| <p><strong>Example</strong>:</p> |
| <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">gcs_to_gcs_transfer_op</span> <span class="o">=</span> <span class="n">GoogleCloudStorageToGoogleCloudStorageTransferOperator</span><span class="p">(</span> |
| <span class="n">task_id</span><span class="o">=</span><span class="s1">'gcs_to_gcs_transfer_example'</span><span class="p">,</span> |
| <span class="n">source_bucket</span><span class="o">=</span><span class="s1">'my-source-bucket'</span><span class="p">,</span> |
| <span class="n">destination_bucket</span><span class="o">=</span><span class="s1">'my-destination-bucket'</span><span class="p">,</span> |
| <span class="n">project_id</span><span class="o">=</span><span class="s1">'my-gcp-project'</span><span class="p">,</span> |
| <span class="n">dag</span><span class="o">=</span><span class="n">my_dag</span><span class="p">)</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>source_bucket</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The source Google cloud storage bucket where the |
| object is. (templated)</p></li> |
| <li><p><strong>destination_bucket</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The destination Google cloud storage bucket |
| where the object should be. (templated)</p></li> |
| <li><p><strong>project_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The ID of the Google Cloud Platform Console project that |
| owns the job</p></li> |
| <li><p><strong>gcp_conn_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Optional connection ID to use when connecting to Google Cloud |
| Storage.</p></li> |
| <li><p><strong>delegate_to</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – The account to impersonate, if any. |
| For this to work, the service account making the request must have |
| domain-wide delegation enabled.</p></li> |
| <li><p><strong>description</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Optional transfer service job description</p></li> |
| <li><p><strong>schedule</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – <p>Optional transfer service schedule; |
| If not set, run transfer job once as soon as the operator runs |
| See: |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs</a>. |
| With two additional improvements:</p> |
| <ul> |
| <li><p>dates they can be passed as <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.date" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a></p></li> |
| <li><p>times they can be passed as <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.time" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.time</span></code></a></p></li> |
| </ul> |
| </p></li> |
| <li><p><strong>object_conditions</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – Optional transfer service object conditions; see |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec#ObjectConditions">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec#ObjectConditions</a></p></li> |
| <li><p><strong>transfer_options</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – Optional transfer service transfer options; see |
| <a class="reference external" href="https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec#TransferOptions">https://cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec#TransferOptions</a></p></li> |
| <li><p><strong>wait</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Wait for transfer to finish; defaults to <cite>True</cite></p></li> |
| <li><p><strong>timeout</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) – Time to wait for the operation to end in seconds</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = ['gcp_conn_id', 'source_bucket', 'destination_bucket', 'description', 'object_conditions']</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GoogleCloudStorageToGoogleCloudStorageTransferOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator.ui_color"> |
| <code class="descname">ui_color</code><em class="property"> = #e09411</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GoogleCloudStorageToGoogleCloudStorageTransferOperator.ui_color"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator.ui_color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GoogleCloudStorageToGoogleCloudStorageTransferOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator._create_body"> |
| <code class="descname">_create_body</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/operators/gcp_transfer_operator.html#GoogleCloudStorageToGoogleCloudStorageTransferOperator._create_body"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.operators.gcp_transfer_operator.GoogleCloudStorageToGoogleCloudStorageTransferOperator._create_body" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../gcp_translate_operator/index.html" class="btn btn-neutral float-right" title="airflow.contrib.operators.gcp_translate_operator" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="../gcp_sql_operator/index.html" class="btn btn-neutral float-left" title="airflow.contrib.operators.gcp_sql_operator" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |