【问题标题】:MySQL timeout with azure data factory copyMySQL 超时与 Azure 数据工厂副本
【发布时间】:2018-02-28 22:26:57
【问题描述】:

我正在使用 azure 数据工厂从 MySQL 服务器复制数据作为源。数据量很大。当我设置管道并执行它时:

MySQL: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

我认为这可以通过this answer 解决。如何将此配置添加到使用 MySQL 作为源的数据工厂管道中?

更新:我正在使用普通脚本将数据从本地 MySQL 复制到 SQL 数据仓库。 MySQL 查询是简单的选择:select * from mytable; 完全错误:

复制活动在源端遇到用户错误: GatewayNodeName=MYGATEWAY,ErrorCode=UserErrorFailedMashupOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message='Type=Microsoft.Data.Mashup.MashupValueException,Message=MySQL: 超时已过。在完成之前超时时间已过 操作或服务器不 响应。,Source=Microsoft.MashupEngine,',Source=,'。

【问题讨论】:

  • 你能确认这是关于默认超时配置吗?您发布的答案只是使用 MySQL 连接器,它与 Azure 上的数据工厂不同。
  • 我面临的问题是获取数据的查询需要太多时间。甚至可能需要一个多小时。在执行大约 10 分钟后,我在管道中遇到了错误。
  • 可能是 MYSQL 超时问题。发布SHOW GLOBAL VARIABLES LIKE "%timeout%";输出

标签: mysql azure azure-data-factory azure-virtual-network


【解决方案1】:

好吧,如果这个问题与默认超时配置有关,您可以在管道设置中的"activities" 中添加这些脚本,以将 timeout 设置为 1 小时:

"Policy": {
       "concurrency": 1,
       "timeout": "01:00:00"
 }

---------更新----------

管道配置的整个 JSON 如下:

{
     "name": "ADFTutorialPipelineOnPrem",
     "properties": {
     "description": "This pipeline has one Copy activity that copies data from an on-prem SQL to Azure blob",
     "activities": [
       {
         "name": "CopyFromSQLtoBlob",
         "description": "Copy data from on-prem SQL server to blob",
         "type": "Copy",
         "inputs": [
           {
             "name": "EmpOnPremSQLTable"
           }
         ],
         "outputs": [
           {
             "name": "OutputBlobTable"
           }
         ],
         "typeProperties": {
           "source": {
             "type": "SqlSource",
             "sqlReaderQuery": "select * from emp"
           },
           "sink": {
             "type": "BlobSink"
           }
         },
         "Policy": {
           "concurrency": 1,
           "executionPriorityOrder": "NewestFirst",
           "style": "StartOfInterval",
           "retry": 0,
           "timeout": "01:00:00"
         }
       }
     ],
     "start": "2016-07-05T00:00:00Z",
     "end": "2016-07-06T00:00:00Z",
     "isPaused": false
   }
 }

以下示例假设您在 MySQL 中创建了一个表“MyTable”,它包含一个名为“timestampcolumn”的列用于时间序列数据。设置“external”:“true”通知数据工厂服务该表在外部数据工厂,并且不是由数据工厂中的活动产生的。:

{
        "name": "MySqlDataSet",
        "properties": {
            "published": false,
            "type": "RelationalTable",
            "linkedServiceName": "OnPremMySqlLinkedService",
            "typeProperties": {},
            "availability": {
                "frequency": "Hour",
                "interval": 1
            },
            "external": true,
            "policy": {
                "externalData": {
                    "retryInterval": "00:01:00",
                    "retryTimeout": "01:00:00",
                    "maximumRetry": 3
                }
            }
        }
    }

有关如何为 Azure 数据工厂创建管道的更多详细信息,请参阅this document

有关将数据从本地 MySQL 移动到 Azure 数据工厂的整个教程的更多信息,请参阅this link

【讨论】:

  • 试过这个。仍然得到同样的错误。我在管道执行的 10-15 分钟内遇到错误。
  • @RuchitRami ,您可以进入Diagram查看数据工厂,双击EmpOnPremSQLTable监控管道。单击查看更多以查看您的管道上发生了什么。如果您看到任何错误消息,请在此处发布以告知我们。
  • @RuchitRami ,如果您不介意,可以发布您的管道脚本并更新您的问题。
  • 我在问题中包含了我发现的错误。为我正在使用的脚本添加了更多描述。
  • @RuchitRami,我的意思是在管道的右侧窗格中发布您的 JSON。这样我就可以看到你的脚本是什么。你有没有参考我发布的官方文档来配置这个?。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-02-04
  • 2017-01-31
  • 1970-01-01
相关资源
最近更新 更多