跳到主要内容
版本:2.3.13

Klaviyo

Klaviyo 源连接器

描述​

用于从 Klaviyo 读取数据。

关键特性​

选项​

参数名类型必须默认值描述
urlString是-HTTP 请求 URL
private_keyString是-用于登录的 API 私钥,您可以在此链接获取更多详情:https://developers.klaviyo.com/en/docs/authenticate_#private-key-authentication
revisionString是-API 端点版本(格式:YYYY-MM-DD)
methodString否getHTTP 请求方法,仅支持 GET、POST 方法
schemaConfig否-上游数据的模式。更多详情请参考 Schema 特性。
schema.fieldsConfig否-上游数据的模式字段
formatString否json上游数据的格式,现在仅支持 json text,默认 json。
paramsMap否-HTTP 参数
bodyString否-HTTP 请求体
json_fieldConfig否-JSON 字段配置
content_jsonString否-内容 JSON 字段
poll_interval_millisint否-流模式下请求 HTTP API 的间隔(毫秒)
retryint否-如果 HTTP 请求返回 IOException 时的最大重试次数
retry_backoff_multiplier_msint否100HTTP 请求失败时的重试退避倍数(毫秒)
retry_backoff_max_msint否10000HTTP 请求失败时的最大重试退避时间(毫秒)
enable_multi_linesboolean否false启用多行
common-optionsconfig否-源插件通用参数,请参考 源通用选项 详见。

url [String]​

HTTP 请求 URL

private_key [String]​

用于登录的 API 私钥,您可以在此链接获取更多详情:

https://developers.klaviyo.com/en/docs/authenticate_#private-key-authentication

revision [String]​

API 端点版本(格式:YYYY-MM-DD)

method [String]​

HTTP 请求方法,仅支持 GET、POST 方法

params [Map]​

HTTP 参数

body [String]​

HTTP 请求体

poll_interval_millis [int]​

流模式下请求 HTTP API 的间隔(毫秒)

retry [int]​

如果 HTTP 请求返回 IOException 时的最大重试次数

retry_backoff_multiplier_ms [int]​

HTTP 请求失败时的重试退避倍数(毫秒)

retry_backoff_max_ms [int]​

HTTP 请求失败时的最大重试退避时间(毫秒)

format [String]​

上游数据的格式,现在仅支持 json text,默认 json。

当您指定格式为 json 时,您还应该指定 schema 选项,例如:

上游数据如下:

{
"code": 200,
"data": "get success",
"success": true
}

您应该指定 schema 如下:

schema {
fields {
code = int
data = string
success = boolean
}
}

连接器将生成如下数据:

codedatasuccess
200get successtrue

当您指定格式为 text 时,连接器将对上游数据不做任何处理,例如:

上游数据如下:

{
"code": 200,
"data": "get success",
"success": true
}

连接器将生成如下数据:

content
{"code": 200, "data": "get success", "success": true}

schema [Config]​

fields [Config]​

上游数据的模式字段。更多详情请参考 Schema 特性。

content_json [String]​

此参数可以获取一些 JSON 数据。如果您只需要 'book' 部分中的数据,请配置 content_field = "$.store.book.*"。

json_field [Config]​

此参数帮助您配置模式,因此此参数必须与 schema 一起使用。

common options​

源插件通用参数,请参考 源通用选项 详见。

示例​

Klaviyo {
url = "https://a.klaviyo.com/api/lists/"
private_key = "SeaTunnel-test"
revision = "2020-10-17"
method = "GET"
format = "json"
schema = {
fields {
type = string
id = string
attributes = {
name = string
created = string
updated = string
}
links = {
self = string
}
}
}
}

变更日志​

Change Log
ChangeCommitVersion
[improve] http connector options (#8969)https://github.com/apache/seatunnel/commit/63ff9f910a2.3.10
[Feature][Connector-V2] Support TableSourceFactory/TableSinkFactory on http (#5816)https://github.com/apache/seatunnel/commit/6f49ec6ead2.3.4
[Improve][build] Give the maven module a human readable name (#4114)https://github.com/apache/seatunnel/commit/d7cd6010512.3.1
[Improve][Project] Code format with spotless plugin. (#4101)https://github.com/apache/seatunnel/commit/a2ab1665612.3.1
[Improve][Connector-V2][Http]Improve json parse option rule for all http connector (#3627)https://github.com/apache/seatunnel/commit/589e4161ec2.3.0
[Feature][Connector-V2][HTTP] Use json-path parsing (#3510)https://github.com/apache/seatunnel/commit/1807eb6c952.3.0
[Hotfix][OptionRule] Fix option rule about all connectors (#3592)https://github.com/apache/seatunnel/commit/226dc6a1192.3.0
[Improve][Connector-V2][Klaviyo]Unified exception for Klaviyo connector (#3555)https://github.com/apache/seatunnel/commit/08f86150782.3.0
[Feature][Connector-V2][Klaviyo]Add Klaviyo source connector (#3443)https://github.com/apache/seatunnel/commit/fc00a2866b2.3.0