Learn how to generate datasets from query results Connect Microsoft Power BI Desktop/Tableau directly to the Query Service Creating a report in Microsoft Power BI Desktop/Tableau Desktop
Lesson Context
A command line interface to query data is exciting but it doesn't present well. In this lesson, we will guide you through a recommended workflow for how you can use Microsoft Power BI Desktop/Tableau directly the Query Service to create visual reports for your stakeholders.
4.4.1 Create a dataset from a SQL query
The complexity of your query will impact how long it takes for the Query Service to return results. And when querying directly from the command line or other solutions like Microsoft Power BI/Tableau the Query Service is configured with a 5 minute timeout (600 seconds). And in certain cases these solutions will be configured with shorter timeouts. To run larger queries and front load the time it takes to return results we offer a feature to generate a dataset from the query results. This feature utilizes the standard SQL feature know as Create Table As Select (CTAS). It is available in the Platform UI from the Query List and also available to be run directly from the command line with PSQL.
In the previous you've replaced enter your name with your own ldap before executing it in PSQL.
select/* enter your name */ e.--aepTenantId--.identification.core.ecid as ecid, e.placeContext.geo.city as city, e.placeContext.geo._schema.latitude latitude, e.placeContext.geo._schema.longitude longitude, e.placeContext.geo.countryCode as countrycode, c.--aepTenantId--.interactionDetails.core.callCenterAgent.callFeeling as callFeeling, c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic as callTopic, c.--aepTenantId--.interactionDetails.core.callCenterAgent.callContractCancelled as contractCancelled, l.--aepTenantId--.loyaltyDetails.level as loyaltystatus, l.--aepTenantId--.loyaltyDetails.points as loyaltypoints, l.--aepTenantId--.identification.core.loyaltyId as crmidfrom demo_system_event_dataset_for_website_global_v1_1 e ,demo_system_event_dataset_for_call_center_global_v1_1 c ,demo_system_profile_dataset_for_loyalty_global_v1_1 lwhere e.--aepTenantId--.demoEnvironment.brandName IN ('Luma Telco', 'Citi Signal')and e.web.webPageDetails.name in ('Cancel Service', 'Call Start')and e.--aepTenantId--.identification.core.ecid = c.--aepTenantId--.identification.core.ecidand l.--aepTenantId--.identification.core.ecid = e.--aepTenantId--.identification.core.ecid;