简体   繁体   English

Singer.io 增量加载不工作

[英]singer.io incremental load is not working

Working with singer.io trying to get data from mysql using xampp on Ubuntu and able to fetch historical data but then i tried to get the incremental load the code is not working. Working with singer.io trying to get data from mysql using xampp on Ubuntu and able to fetch historical data but then i tried to get the incremental load the code is not working.

Not able to get the replication_key_value if anyone can help i will be really thankful to you.如果有人可以提供帮助,我将无法获得 replication_key_value,我将非常感谢您。

config.json: config.json:

{
  "host": "localhost",
  "port": "3307",
  "user": "root",
  "password": ""
}

properties.json:属性。json:

{
  "streams": [
    {
      "tap_stream_id": "test_1-company",
      "table_name": "company",
      "schema": {
        "properties": {
          "COMPANY_ID": {
            "inclusion": "automatic",
            "maxLength": 6,
            "type": [
              "null",
              "string"
            ]
          },
          "COMPANY_NAME": {
            "inclusion": "available",
            "maxLength": 25,
            "type": [
              "null",
              "string"
            ]
          },
          "COMPANY_CITY": {
            "inclusion": "available",
            "maxLength": 25,
            "type": [
              "null",
              "string"
            ]
          }
        },
        "type": "object"
      },
      "stream": "company",
      "metadata": [
        {
          "breadcrumb": [],
          "metadata": {
            "selected-by-default": false,
            "database-name": "test_1",
            "row-count": 7,
            "is-view": false,
            "table-key-properties": [
              "COMPANY_ID"
            ],
            "replication-method": "INCREMENTAL",
            "replication-key": "COMPANY_ID"
          }
        },
        {
          "breadcrumb": [
            "properties",
            "COMPANY_ID"
          ],
          "metadata": {
            "selected-by-default": true,
            "sql-datatype": "varchar(6)"
          }
        },
        {
          "breadcrumb": [
            "properties",
            "COMPANY_NAME"
          ],
          "metadata": {
            "selected-by-default": true,
            "sql-datatype": "varchar(25)"
          }
        },
        {
          "breadcrumb": [
            "properties",
            "COMPANY_CITY"
          ],
          "metadata": {
            "selected-by-default": true,
            "sql-datatype": "varchar(25)"
          }
        }
      ]
    }
  ]
}

Console log:控制台日志:

tap-mysql -c config.json --properties properties.json
INFO Server Parameters: version: 10.4.14-MariaDB, wait_timeout: 2700, innodb_lock_wait_timeout: 2700, max_allowed_packet: 1048576, interactive_timeout: 28800
INFO Server SSL Parameters (blank means SSL is not active): [ssl_version: ], [ssl_cipher: ]
{"type": "STATE", "value": {"currently_syncing": null}}

Can you share your executable?你能分享你的可执行文件吗? Your problem may be in the state.json file.您的问题可能在 state.json 文件中。 State.json needs the form: State.json需要表格:

{
   "bookmarks":{
      "123po-employee":{
         "replication_key":"Id",
         "replication_key_value":45,
         "version":1609927544221
      }
   },
   "currently_syncing":null
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM