Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Table Name Support?

Yusuf TAMBAG February 22, 2018

Hi,

 

I need to parametrize table names of several queries in order to get different set of data for different projects. Otherwise I need to define a customfield for each project separately for the same query.

I tried both "select .. from yte_test_{project}_table" and defining a custom field that returns project key and use that cf "select .. from yte_test_{customfield_17478}_table" both failed with error " yte_test_$1_table" does not exists. So I conculude that parametrizing table name is not possible at the moment, If so is there a plan to support this kind of query or else there is a way so how can achive this without duplicating the cf.

 

-thank you very much

-yusuf

2 answers

0 votes
Yusuf TAMBAG February 22, 2018

thank you very much Alexey, I really don't know how I missed this point, adding project_key column and project_key={project} condition to the query did the trick.

 

-thank you very much

-yusuf

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2018

I think you need to reconsider the structure of your database. You can have one table and save data for all projects there. You can have a column in the table, where you would save a project name, and you could filter on the column later.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events