TypeError: Cannot read properties of undefined (reading 'columns')

Preeti Bhole
Contributor
June 4, 2024

I am trying to join 2 tables in Table Transformer using UNION but not both the tables will return data all the time. Even if one of the table does not have data, the table transformer query does not work and throws below error:

TypeError: Cannot read properties of undefined (reading 'columns')

Can someone suggest a solution to this?

1 answer

2 votes
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.
June 5, 2024

Hi @Preeti Bhole ,

If you have questions regarding the Table Filter, Charts & Spreadsheets for Confluence app (the Table Transformer macro is also provided by this app), please refer to our support

The support portal is confidential, so you'll be able to share the screenshots of your source tables and your current SQL query and we'll look into the issue.

As for now, you may check if your SQL is a general one:

SELECT * FROM T1 OUTER JOIN T* ON T1.'Key' = T*.'Key'

I mean that you don't refer to the columns of specific tables. Then if one table is missing, the query won't be broken. 

Preeti Bhole
Contributor
June 5, 2024

Thank you for your reply. My issue is not with JOIN but I am using UNION to merge data from multiple tables and it can happen that data is not available in all tables. How to address this case?

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.
June 5, 2024

You may try not a very elegant option but nevertheless: I assume that each of your tables is coming from Jira so you don't know if the data will be present or there will be no any table at all.

So, you may create a manual duplicate of the Jira Issues table for every Jira output: the same number of columns, the same headers and one row with data (for example, "no data" in each cell or smth).

Then you wrap every pair in a separate Table Transformer macro and use the standard "Merge" preset.

As a result, you'll always have a valid table: Jira rows + "no data" row or only "no data" row. So, your main query in the external Table Transformer macro won't be broken.

Later you may wrap your external Table Transformer macro in the Table Filter macro, set the reversed filter and get rid of the "no data" row.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events