apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.

Home Page:https://seatunnel.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] [Zeta] Config variable substitution 不一致

xuqi1633 opened this issue · comments

Search before asking

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

What happened

来自官网案例: https://seatunnel.apache.org/docs/2.3.5/concept/config/#config-variable-substitution

变量替换 和传入的变量不一致

SeaTunnel Version

2.3.5

SeaTunnel Config

env {
  job.mode = "BATCH"
  job.name = ${jobName}
  parallelism = 2
}

source {
  FakeSource {
    result_table_name = ${resName}
    row.num = ${rowNum}
    string.template = ${strTemplate}
    int.template = [20, 21]
    schema = {
      fields {
        name = ${nameType}
        age = "int"
      }
    }
  }
}

transform {
    sql {
      source_table_name = "fake"
      result_table_name = "sql"
      query = "select * from "${resName}" where name = '"${nameVal}"' "
    }

}

sink {
  Console {
     source_table_name = "sql"
     username = ${username}
     password = ${password}
     blankSpace = ${blankSpace}
  }
}

Running Command

./bin/seatunnel.sh -c <this_config_file> 
-i jobName='st var job' 
-i resName=fake 
-i rowNum=10 
-i strTemplate=['abc','d~f','h i'] 
-i nameType=string 
-i nameVal=abc 
-i username=seatunnel=2.3.1 
-i password='$a^b%c.d~e0*9(' 
-i blankSpace='2023-12-26 11:30:00' 
-e local

Error Exception

no error

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

企业微信截图_1fef571b-888a-4190-b5af-247959c5bbe5

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@liunaijie would you mind take a look?

if the variables has blank space, will has issue. will check on this.

@liunaijie can you review above pr