Change Templating format when multiple values of a variable are selected

I am developing a DataSource plugin and I had set up variables , when i am selecting multiple variables Its embedding them with a pipe like ‘(ams|arn)’ into the query

Where could i change this formatting in the plugin ?

thanks