# Passing Runtime Variables to SQL files

**URL:** <https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331>\
**Category:** General Discussion\
**Created:** [June 18, 2020, 9:21pm UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331 "2020-06-18T21:21:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Devopsfordb](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Devopsfordb](https://forum.liquibase.org/u/Devopsfordb)\
**Post date:** [June 18, 2020, 9:21pm UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331/1 "2020-06-18T21:21:34Z")

</div>

Hello All, We have recently started using Liquibase, I would like to know if it is possible to pass runtime variables to SQL scripts in Liquibase. For examples I have &schema\_name in my script, can I store this value in the properties file and call it out during the script execution.

---

<div class="post-metadata">

**Author:** ![Pete](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/pete/32/184_2.png) [@Pete](https://forum.liquibase.org/u/Pete)\
**Post date:** [June 18, 2020, 9:58pm UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331/2 "2020-06-18T21:58:02Z")

</div>

Hi Karthik,

It is possible to pass runtime variables in Liquibase but the required format of the runtime variable is different than the patterns used by the DBMS you are using. Here’s the documentation link: [https://docs.liquibase.com/concepts/basic/changelog-parameters.html?Highlight=parameters](https://docs.liquibase.com/concepts/basic/changelog-parameters.html?Highlight=parameters)

To summarize, the variable would be expressed like this `${schema_name}` in the SQL. Depending on how you are running Liquibase, you can pass in the value at runtime in a few different ways that are listed in the doc page above.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Devopsfordb](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Devopsfordb](https://forum.liquibase.org/u/Devopsfordb)\
**Post date:** [June 19, 2020, 7:37pm UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331/3 "2020-06-19T19:37:45Z")

</div>

Thank you Pete.

Is this supported in Liquibase Open Source Version?

Regards,  
Karthik.

---

<div class="post-metadata">

**Author:** ![Pete](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/pete/32/184_2.png) [@Pete](https://forum.liquibase.org/u/Pete)\
**Post date:** [June 19, 2020, 8:00pm UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331/4 "2020-06-19T20:00:55Z")

</div>

Yes I believe it should be.

---

<div class="post-metadata">

**Author:** ![Devopsfordb](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Devopsfordb](https://forum.liquibase.org/u/Devopsfordb)\
**Post date:** [June 19, 2020, 9:48pm UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331/5 "2020-06-19T21:48:28Z")

</div>

Thank you so much Pete , it s working perfectly.

---

<div class="post-metadata">

**Author:** ![ronak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ronak/32/221_2.png) [@ronak](https://forum.liquibase.org/u/ronak)\
**Post date:** [June 30, 2020, 3:31am UTC](https://forum.liquibase.org/t/passing-runtime-variables-to-sql-files/4331/6 "2020-06-30T03:31:53Z")

</div>


