Zakyrel commented on PR #27073: URL: https://github.com/apache/superset/pull/27073#issuecomment-2134756310
> @Zakyrel it's an unusual, but valid use case. We'd probably be open to a proposal/PR for such a fix. > > In the meantime, I wonder if you can do a workaround by adjusting the query to spit out a row of NULLs when there's no REAL data. Something like: > > ``` > SELECT company.taxnumber, company.name, company.status, company.termination_date > FROM company > WHERE company.status = 'In activity' > AND company.termination_date IS NOT NULL > > UNION ALL > > SELECT NULL as taxnumber, NULL as name, NULL as status, NULL as termination_date > WHERE NOT EXISTS ( > SELECT 1 > FROM company > WHERE company.status = 'In activity' > AND company.termination_date IS NOT NULL > ); > ``` Hello, I finally take some time to go back here and answer about this issue. When I encoutnered this issue, I used a workaround like this : <my query> UNION ALL SELECT NULL, NULL, NULL, NULL The number of "NULL" I'm using in the last line must be equal tu the number of field fetched with the SELECT of my query. It forces Drill to send to Superset all rows from my query, but with one row of NULL values. It works, but not the normal way since I have 1 row on each table graph I have (meaning that no data matches the query). It would be a good improvment to fix this issue, because sometime I have the following issue: New fields are added in a table. And for queries when i do a SELECT *, sudenly my SELECT NULL, NULL, NULL, NULL doesn't have enough "NULL" anymore, ending in an error for the related table graph.  Regards, -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
