Skip to content

[Bug] [tranform] Fields out of order after field mapper #15001

@Tomccat3

Description

@Tomccat3

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

i have a task source from mysql, sink to maxcompute, with field mapper, i find sink columns in maxcompute is out of order
env {
job.mode = BATCH
}

source {
Jdbc{
password = ""
driver = "com.mysql.cj.jdbc.Driver"
query = "SELECT id,uid,user_name,job_name,params,created_at,updated_at FROM lakeservice_task"
partition_column = "id"
user = "
"
url = ""
partition_num = "4"
}
}
transform {
FieldMapper {
field_mapper = {
id = id
uid = uid
user_name = user_name
job_name = job_name
params = params
created_at = created_at
updated_at = updated_at
}
}
}
sink {
Maxcompute{
accessId = "
"
endpoint = ""
accesskey = "
"
project = "dp_ads_app_ecube_sec_sit_dev"
table_name = "lake_service_07"
}
}

What you expected to happen

image

  1. The uid column writes the value of the params column。
  2. The updated_at column writes the value of the id column...
    All column values are written incorrectly

How to reproduce

  1. create a task with mysql source and maxcompute sink
  2. add fieldmapper
  3. select records from maxcompute, column value is out of order。

Anything else

No response

Version

3.1.x

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions