diff --git a/client_etl.go b/client_etl.go index 4d87c2c7..ae3d047e 100644 --- a/client_etl.go +++ b/client_etl.go @@ -28,8 +28,8 @@ type ETLConfiguration struct { RoleArn string `json:"roleArn,omitempty"` Script string `json:"script"` ToTime int32 `json:"toTime,omitempty"` - Lang int8 `json:"version"` - Version int8 `json:"lang"` + Version int8 `json:"version"` + Lang string `json:"lang"` ETLSinks []ETLSink `json:"sinks"` } @@ -38,15 +38,15 @@ type ETLSchedule struct { } type ETLSink struct { - AccessKeyId string `json:"accessKeyId"` - AccessKeySecret string `json:"accessKeySecret"` - Endpoint string `json:"endpoint"` - Logstore string `json:"logstore"` - Name string `json:"name"` - Project string `json:"project"` - RoleArn string `json:"roleArn,omitempty"` - Type string `json:"type,omitempty"` - DataSets string `json:"datasets"` + AccessKeyId string `json:"accessKeyId"` + AccessKeySecret string `json:"accessKeySecret"` + Endpoint string `json:"endpoint"` + Logstore string `json:"logstore"` + Name string `json:"name"` + Project string `json:"project"` + RoleArn string `json:"roleArn,omitempty"` + Type string `json:"type,omitempty"` + DataSets []string `json:"datasets,omitempty"` } type ListETLResponse struct { diff --git a/example/etl/etl_example.go b/example/etl/etl_example.go index 11337ede..858714ae 100644 --- a/example/etl/etl_example.go +++ b/example/etl/etl_example.go @@ -76,7 +76,10 @@ func getETLJob(etlJobName string, etlScript string) sls.ETL { AccessKeySecret: accessKeySecret, Endpoint: endpoint, Project: projectName, - Logstore: "target_logstore_name", + DataSets: []string{ + "__UNNAMED__", + }, + Logstore: "target_logstore_name", } config := sls.ETLConfiguration{ @@ -86,6 +89,7 @@ func getETLJob(etlJobName string, etlScript string) sls.ETL { Logstore: logStoreName, FromTime: time.Now().Unix(), Script: etlScript, + Lang: "SPL", Parameters: map[string]string{}, ETLSinks: []sls.ETLSink{sink}, }