Thanks Ingo!
I just discovered this a short while before you posted :)

Ideally, I'd like to validate that the entire pipeline is set up correctly.
The problem is that I can't use methods like `tableEnv.sqlQuery` from
multiple threads, and this is really limiting my ability to speed up the
process (today it takes over an hour to complete, which isn't reasonable).
If anyone has any suggestions on how I can still leverage the
TableEnvironment in the processor to validate my SQL queries I'd be happy
to know.

On Wed, Aug 18, 2021 at 2:37 PM Ingo Bürk <i...@ververica.com> wrote:

> Hi Yuval,
>
> if syntactical correctness is all you care about, parsing the SQL should
> suffice. You can get a hold of the parser from
> TableEnvironmentImpl#getParser and then run #parse. This will require you
> to cast your table environment to the (internal) implementation, but maybe
> this works for you?
>
>
> Best
> Ingo
>
> On Wed, Aug 18, 2021 at 12:51 PM Yuval Itzchakov <yuva...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I have a use-case where I need to validate hundreds of Flink SQL queries.
>> Ideally, I'd like to run these validations in parallel. But, given that
>> there's an issue with Calcite and the use of thread-local storage, I can
>> only interact with the table runtime via a single thread.
>>
>> Ideally, I don't really care about the overall registration process of
>> sources, transformations and sinks, I just want to make sure the syntax is
>> correct from Flinks perspective.
>>
>> Is there any straightforward way of doing this?
>>
>> --
>> Best Regards,
>> Yuval Itzchakov.
>>
>

-- 
Best Regards,
Yuval Itzchakov.

Reply via email to