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] [Seatunnel-Web] Conditional Options are not parsed correctly during Dynamic Form Generation #7807

Open
3 tasks done
shashwatsai opened this issue Oct 10, 2024 · 2 comments
Labels

Comments

@shashwatsai
Copy link
Contributor

Search before asking

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

What happened

While working on contributing to seatunnel-web HDFS datasource interface, as per HdfsFileSourceFactory#OptionRule we should allow users to provide user defined schema for TEXT, CSV, JSON, EXCEL and XML, during dynamic form generation, only for file_format_type TEXT, we are able to provide the schema.

Reason:
for conditional options which have an expression with multiple conditions like file_format_type==TEXT || file_format_type==CSV, during form generation, only the first expression is parsed.

.conditional(
    BaseSourceConfigOptions.FILE_FORMAT_TYPE,
    Arrays.asList(
            FileFormat.TEXT,
            FileFormat.JSON,
            FileFormat.EXCEL,
            FileFormat.CSV,
            FileFormat.XML),
    TableSchemaOptions.SCHEMA)

This issue was observed while working on #7767

SeaTunnel Version

seatunnel: 2.3.7
seatunnel-web: 1.0.1

SeaTunnel Config

Issue during generation of seatunnel config for HDFS.

Running Command

1. Navigate to seatunnel-web deployment.
2. Try choose HdfsFile as source or sink.
3. choose a file_format_type, only for TEXT, the schema field gets rendered.

Error Exception

Unable to select schema for file format types other than TEXT

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

schema field, actual:
Screen Grab:
image

Rendered:
For Text:
image

For CSV: No Schema field to provide input.
image

schema field expected:
Screen Grab:
image
Expected: (For CSV as well we should see Schema field)
image

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@shashwatsai
Copy link
Contributor Author

CC: @arshadmohammad

@shashwatsai
Copy link
Contributor Author

#7767 must be handled first.

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

1 participant