Hi Mohammad:
We can support default value in SeaTunnel Web just like we did in
https://seatunnel.apache.org/docs/concept/sink-options-placeholders#placeholder
eg:
SELECT name, age FROM test.test_table WHERE age > ${ageParam:25}. Users
should define the default value when creating a source.
WDYT?

Mohammad Arshad <[email protected]> 于2024年8月30日周五 00:22写道:

> Thank you Jia Fan for your reply
>
> Yes, the variable substitution feature is available in SeaTunnel Engine. If
> the job were created manually, there would be no issues. However, the
> problem arises when a job is created through SeaTunnel Web.
>
> In SeaTunnel Web, how can I create a source step with a query like "SELECT
> name, age FROM test.test_table WHERE age > ${ageParam}"? Do you think this
> is possible through the SeaTunnel Web?
>
> Thanks & Regards
> Mohammad Arshad
>
>
>
> On Thu, Aug 29, 2024 at 7:32 AM Jia Fan <[email protected]> wrote:
>
> > One way is to use our config variable feature in
> >
> >
> https://seatunnel.apache.org/docs/2.3.7/concept/config#config-variable-substitution
> > .
> >
> > Arshad, Mohammad <[email protected]> 于2024年8月28日周三
> 19:27写道:
> >
> > > Hi All,
> > > I'm interested in creating a job that includes a conditional query, yet
> > it
> > > appears that this option is currently unavailable in SeaTunnel-Web.
> > > To illustrate, suppose we have a test_table with fields name and age.
> My
> > > objective is to transfer all records from test_table to another table,
> > but
> > > only for those entries where age is greater than 25.
> > >
> > > At present, SeaTunnel-Web enables the creation of jobs with queries
> such
> > > as “SELECT `name`, `age` FROM `test`.`test_table`”. However, it does
> not
> > > provide an option for creating queries like
> > > “SELECT `name`, `age` FROM `test`.`test_table` where  `age` > 25” or
> > > “SELECT `name`, `age` FROM `test`.`test_table` where  `age` >$
> > {ageParam}”
> > >
> > > Could there be something I'm overlooking? Are there any alternative
> > > methods to accomplish this?
> > >
> > > An attempt is made to add support for this feature at execution time as
> > > part of the pull request at
> > > https://github.com/apache/seatunnel-web/pull/193.
> > > However, it might be more efficient if the conditional query could be
> > > supported directly at the job creation stage. Only some parameters to
> be
> > > changed at execution time, not the whole query.
> > >
> > > Does anyone have any ideas or suggestions on how to implement this
> > feature?
> > >
> > > Thanks & Regards
> > > Mohammad Arshad
> > >
> > >
> >
>

Reply via email to