I don't have a yarn cluster available to test this with, but see FLINK-18273 which explains that
The SQL Client YAML has a deployment section. One can use the regular flink run options there and configure e.g. a YARN job session cluster. This is neither tested nor documented but should work due to the architecture.
and also mentions that
The deployment section has also problems with keys that use upper cases. E.g. fromsavepoint
!= fromSavepoint
which requires to use the short option s
as a workaround.
Putting those two statements together suggests that putting this entry into sql-env.yaml
(xxx is the yarn application id):
deployment:
yid: xxx
and then starting the client via sql-client embedded -e sql-env.yaml
might just work.
See also https://docs.cloudera.com/csa/1.2.0/sql-client/topics/csa-sql-client-session-config.html.