Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 3 tasks
xuqi1633 opened this issue May 11, 2024 · 3 comments
Open
2 of 3 tasks

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

xuqi1633 opened this issue May 11, 2024 · 3 comments
Labels
Milestone

Comments

@xuqi1633
Copy link

xuqi1633 commented May 11, 2024

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

@xuqi1633 xuqi1633 added the bug label May 11, 2024
@Hisoka-X
Copy link
Member

@liunaijie would you mind take a look?

@Hisoka-X Hisoka-X added this to the 2.3.6 milestone May 11, 2024
@liunaijie
Copy link
Contributor

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

@xuqi1633
Copy link
Author

@liunaijie can you review above pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants