Fatal error wile executing query #32262
Replies: 2 comments 5 replies
-
A similar issue was reported in a closed thread, but no solution was found in the comments [1]. Common causes of fatal errors in Apache Superset when executing SQL queries include syntax errors, database connection issues, non-existent database objects, timeouts, security and permissions issues, invalid queries, results backend issues, and payload or template issues [2]. To troubleshoot, you might want to check for any syntax errors in your SQL query, ensure that all database objects (tables, columns) exist, and verify that you have the necessary permissions. Additionally, consider checking the Superset logs for more detailed error messages that could provide further insights into the issue. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
@dosu chart is giving |
Beta Was this translation helpful? Give feedback.
-
WITH data AS (
SELECT
COALESCE(bur.region_id, 'Unknown') AS region,
br.rm_email,
br.enquiry_number,
br.status,
br.created_on
FROM dl_buyer_rfq br
LEFT JOIN buyer_account ba
ON UPPER(ba.crm_buyer_id) = UPPER(br.crm_buyer_id)
LEFT JOIN business_user_region bur
ON UPPER(bur.user_id) = UPPER(br.rm_id)
WHERE br.source = 'ENQUIRY'
AND br.status != 'REQUEST_RECEIVED'
AND br.rm_name != 'Sidhanta Agarwal'
AND br.created_on >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '4 months'
)
SELECT
data.region,
COUNT(DISTINCT CASE WHEN date(created_on) = date(CURRENT_DATE) THEN rm_email END) AS "Active RMs Today",
COUNT(DISTINCT CASE WHEN date(created_on) = date(CURRENT_DATE) THEN enquiry_number END) AS "Enquiry Today",
COUNT(CASE WHEN date(created_on) = date(CURRENT_DATE) AND status = 'CONVERTED_TO_ORDER' THEN 1 END) AS "Orders Today",
COUNT(DISTINCT CASE WHEN date(created_on) = date(CURRENT_DATE - INTERVAL '1 day') THEN rm_email END) AS "Active RMs Yesterday",
COUNT(DISTINCT CASE WHEN date(created_on) = date(CURRENT_DATE - INTERVAL '1 day') THEN enquiry_number END) AS "Enquiry Yesterday",
COUNT(CASE WHEN date(created_on) = date(CURRENT_DATE - INTERVAL '1 day') AND status = 'CONVERTED_TO_ORDER' THEN 1 END) AS "Orders Yesterday",
COUNT(DISTINCT CASE WHEN date(created_on) >= date(DATE_TRUNC('week', CURRENT_DATE)) THEN rm_email END) AS "Active RMs This Week",
COUNT(DISTINCT CASE WHEN date(created_on) >= date(DATE_TRUNC('week', CURRENT_DATE)) THEN enquiry_number END) AS "Enquiry This Week",
COUNT(CASE WHEN date(created_on) >= DATE_TRUNC('week', CURRENT_DATE) AND status = 'CONVERTED_TO_ORDER' THEN 1 END) AS "Orders This Week",
COUNT(DISTINCT CASE WHEN date(created_on) >= date(DATE_TRUNC('month', CURRENT_DATE)) THEN rm_email END) AS "Active RMs This Month",
COUNT(DISTINCT CASE WHEN date(created_on) >= date(DATE_TRUNC('month', CURRENT_DATE)) THEN enquiry_number END) AS "Enquiry This Month",
COUNT(CASE WHEN date(created_on) >= date(DATE_TRUNC('month', CURRENT_DATE)) AND status = 'CONVERTED_TO_ORDER' THEN 1 END) AS "Orders This Month",
-- Last Month
COUNT(DISTINCT CASE WHEN date(created_on) >= date(DATE_TRUNC('month', CURRENT_DATE)) - INTERVAL '1 month'
AND date(created_on) < date(DATE_TRUNC('month', CURRENT_DATE)) THEN rm_email END) AS "Active RMs Last Month",
COUNT(DISTINCT CASE WHEN date(created_on) >= date(DATE_TRUNC('month', CURRENT_DATE)) - INTERVAL '1 month'
AND date(created_on) < date(DATE_TRUNC('month', CURRENT_DATE)) THEN enquiry_number END) AS "Enquiry Last Month",
COUNT(CASE WHEN date(created_on) >= date(DATE_TRUNC('month', CURRENT_DATE)) - INTERVAL '1 month'
AND date(created_on) < date(DATE_TRUNC('month', CURRENT_DATE)) AND status = 'CONVERTED_TO_ORDER' THEN 1 END) AS "Orders Last Month"
FROM data
GROUP BY data.region
ORDER BY data.region
While I run this query and save dataset it say fatal error
Beta Was this translation helpful? Give feedback.
All reactions