frappe / insights

Open source analytics / business intelligence tool (BI)
https://frappe.io/insights
GNU Affero General Public License v3.0
408 stars 200 forks source link

duplicate column name 'name' error #118

Closed nextchamp-saqib closed 1 year ago

nextchamp-saqib commented 1 year ago

CleanShot 2023-04-27 at 11 37 25

azurre931 commented 1 year ago

Can this be tagged a "Priority", we can't use Insights currently because of this error. Thank you :)

nextchamp-saqib commented 1 year ago

It only occurs if there's no columns selected (in the middle section) An easy workaround is to select at least one column and then add a join

But I too face it often. will prioritise it

nextchamp-saqib commented 1 year ago

f26ffe5310742c3808dba3a8b851275a5449df34

Not actually fixed, but now it won't break. Now, select * from table_1 inner join table_2 will show only columns from the first table.

select * queries are considered a bad practice, so the only solution was to select only the columns needed. Since it's challenging to fetch columns of the joined tables before building the query, I decided to resolve the blocker instead of finding a solution.

Will get back to this if users expect to see columns from all tables after performing a join.