I would like to rename a column based on a value from a second table. Is something like this possible? @Katerina Kovriga _Stiltsoft_ - I have copied you because you have been able to answer a bunch of my previous questions.
Hi @Emily Berg ,
I've been also puzzled with the case, but our developers found a solution using the PIVOT table function:
SELECT * FROM (
SELECT * FROM T1 LEFT JOIN T2 ON T2.'Index' = 2
PIVOT (FIRST('Key') for 'Header Key')
Seems that I've got your case right from the screenshot: we go to the second table, use a condition, select a value based on it and rename the column from the first table - the new name matches this value.
The additional "Index" column can be further hidden with the help of the Table Filter macro or additional Table Transformer macro.
@Katerina Kovriga _Stiltsoft_ - this is so great, thank you! Let's see if we can go a step further - can we do multiple column header changes as once or do I need to wrap in multiple transformers?
(SELECT * FROM T1 LEFT JOIN T2 ON T2.'Index' = 1)
PIVOT(FIRST('Key') for 'Key Column', (FIRST('Summary') for 'Summary Column'))
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events