Handling empty table with table transformer join

Maria Del Rosario Gonzalez
Contributor
December 5, 2024

I have a use case where I am using multiple table excerpt includes wrapped in a table transformer that joins all results with a key field.

My problem appears when some of the tables are empty (which may happen often in all but two of the table includes).  In this case the sql query reference to the tables 'breaks' because the value that I am looking for is empty. 

Is there a way to handle this automatically?

Here is the SQL where sometimes, T3 is actually empty and the transform fails.

 

SELECT T1.'Agile Team',

T2.'Epics Accepted',

T3.'Epics with Dependencies'

FROM T1 outer JOIN T* ON T1.'Agile Team'=T*.'Agile Team'

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2024

Hello @Maria Del Rosario Gonzalez 

Your question is posted in the Jira Service Management Questions forum. Can you clarify how this relates to JSM?

Or is this a Confluence question? If it is I can move it to the Confluence Questions forum.

Maria Del Rosario Gonzalez
Contributor
December 5, 2024

Apologies, I should have posted this to the Confluence forum.  I'll move it, apologies for the error!

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2024
Stiltsoft support
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.
December 6, 2024

In case somebody comes across this question: here is an example from our documentation how to check if the source table exists.

The result query may look as following:

IF OBJECT_ID("T3") IS NOT NULL
SELECT T1.'Agile Team',
T2.'Epics Accepted',
T3.'Epics with Dependencies'
FROM T1 outer JOIN T* ON T1.'Agile Team'=T*.'Agile Team'
ELSE
SELECT T1.'Agile Team',
T2.'Epics Accepted'
FROM T1 outer JOIN T2 ON T1.'Agile Team'=T2.'Agile Team'

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events