# How to assign values to a parametre

**URL:** <https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788>\
**Category:** CloverDX Platform\
**Created:** [August 31, 2016, 12:00am UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788 "2016-08-31T00:00:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prachi.bhatnagar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@prachi.bhatnagar](https://forum.cloverdx.com/u/prachi.bhatnagar)\
**Post date:** [August 31, 2016, 12:00am UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788/1 "2016-08-31T00:00:00Z")

</div>

Hi folks,

My requirement is to assign a query output(select name from ABC) to the parametre. How can I achieve this, as parametre initialisation is the first thing haapen, once the graph is triggered.

i thought of using the DBExecute component and running the query, but stucked in assigning the value to parametre. Can someone please help me out.

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [August 31, 2016, 2:36pm UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788/2 "2016-08-31T14:36:53Z")

</div>

Hi,

Unfortunately, you can’t assign a query output to a parameters during the runtime since they are static and are resolved at the start of the graph. However, I would recommend that you use DBInputTable component and use the Query URL property to read incoming queries to be used in the SQL query attribute through the input port (_e.g. port:$0.fieldname:discrete_). You can read more about the DBInputTable component [here](http://doc.cloveretl.com/documentation/UserGuide/index.jsp?topic=/com.cloveretl.gui.docs/docs/dbinputtable.html).

---

<div class="post-metadata">

**Author:** ![prachi.bhatnagar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@prachi.bhatnagar](https://forum.cloverdx.com/u/prachi.bhatnagar)\
**Post date:** [September 1, 2016, 6:50am UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788/3 "2016-09-01T06:50:56Z")

</div>

I created a query in a reformat before DBInput table and passed that port as query URL, but now i am getting below error :  
D:\Users\prabhatn\Desktop

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [September 1, 2016, 1:27pm UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788/4 "2016-09-01T13:27:20Z")

</div>

Hi,

Could you please re attach your screenshot, I am not able to see it in your prior post.

---

<div class="post-metadata">

**Author:** ![prachi.bhatnagar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@prachi.bhatnagar](https://forum.cloverdx.com/u/prachi.bhatnagar)\
**Post date:** [September 2, 2016, 8:48am UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788/5 "2016-09-02T08:48:29Z")

</div>

Please let me know if there is a way to assign values to parametre

- [clover.PNG](https://cdn.cloverdx.com/forum/18286%5F4654bc67a26be7c38a337cd9bc4d02ae/clover.PNG)

---

<div class="post-metadata">

**Author:** ![PedroVazquezRosario](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@PedroVazquezRosario](https://forum.cloverdx.com/u/PedroVazquezRosario)\
**Post date:** [September 6, 2016, 5:28pm UTC](https://forum.cloverdx.com/t/how-to-assign-values-to-a-parametre/1788/6 "2016-09-06T17:28:27Z")

</div>

Hi,

I would recommend that you use a Jobflow (you will need CloverETL Corporate Server) to assign the value to the parameter. To accomplish this use case, you will generate the SQL output (select \* from ABC) and pass the value to a ExecuteGraph. You will need to create a Parameter in the ETL Graph (e.g. SqlURL) and map this value to the SQL output using the ExecuteGraph component Input Mapping property. Then you can use the Parameter to run the DBInputTable component. I have taken the liberty of attaching both example Jobflow and ETL Graph.

- [dbExample.grf](https://cdn.cloverdx.com/forum/18200%5Fd310550fd03778c382394a465622d9f4/dbExample.grf)
- [dbTest.jbf](https://cdn.cloverdx.com/forum/18200%5F3eae36c75f39674e02950bfc34d4cf66/dbTest.jbf)
