Use of multiple custom SQL queries in QuickSight dataset

0

Hi, I created a new Dataset in QuickSight and added a custom SQL query. The query adds some fields to my dataset. Now I like to execute a second query which uses those fields. Is it possible to execute multiple queries after each other while creating a Dataset? When I add multiple queries I get an errror. Thanks Cees

  • Where are you writing and executing these SQL queries?

질문됨 2년 전1438회 조회
1개 답변
1

Hello,

Thank you for reaching out to us.

If I understand it correctly, you would like to add multiple sqls to Quicksight SPICE dataset so that you can use the columns available in one sql into another sql.

I would like to confirm that, as of now we dont have this feature available in Quicksight. If we try to add multiple sqls to SPICE dataset ,then it will throw an error saying "One query is expected".

However, as a wrok-around you can consider using CTE ->

Original SQLs :-

select tran_id as id,store_id as store, store_city as city, store_city as new_city from retail_transactions; select store_city as new_city from retail_transactions;

CTE :-

with test_cte as (select tran_id as id,store_id as store, store_city as city, store_city as new_city from retail_transactions) select new_city from test_cte;

Thank you and have a great day !

AWS
답변함 2년 전
AWS
전문가
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠