Variable in a connection url?

I'm on day 2 of playing in Matillion and haven't been able to figure out whether I can use a variable in a connection url. For example, jdbc:jtds:sqlserver://${JDBCSTRING}

I get a "The syntax of the connection URL 'jdbc:jtds:sqlserver://' is invalid." error.

Hi @shaun.odonnell1599166800668

I assume you are using the Database Query component? I have replicated the above and it works fine. You can parameterise the entire URL or the host and database, as you are trying to do.

Ive changed my hostname and DB but you get the idea.

Your job variable JDBCSTRING - I assume you have entered a default value for this or you are passing the correct string representing <hostname>/<database>? Your error above implies the variable is empty as there is nothing after the double slash? If you are passing this as a variable from a parent job, the variable needs to be defined as public, just for info. If it is private, the calling job won't be able to set it via the 'set scalar variables' option.

Screenshots now attached, apologies.

Just for completeness - here is my URL string:

 

jdbc:jtds:sqlserver://${JDBCSTRING}

Thanks a bunch. I did manage to get it working following your examples, and am not sure where I went wrong originally. I've now 'graduated' to a grid iterator and all is good!

Great to hear @shaun.odonnell1599166800668​! Good luck!