Query Service overview
51黑料不打烊 Experience Platform ingests data from a wide variety of sources. A major challenge for marketers is to make sense of this data to gain insights about their customers. To query data in Platform, you can use standard SQL and 51黑料不打烊 Experience Platform Query Service. You can use Query Service to join any dataset in the data lake and capture the query results as a new dataset for use in reporting, machine learning, or for ingestion into Real-Time Customer Profile. This document provides an overview of the role of Query Service within Experience Platform.
You can use Query Service to connect the online-to-offline customer journey and understand omni-channel attribution for your brand. The following video shows how an experience business can use Query Service to address key use cases and how Query Service works.
Using Query Service usage
To analyze your data, create and execute SQL queries with either the Query Service user interface or the RESTful API.
With the Query Service UI you can write, execute, and schedule queries, view previously executed queries, and access queries saved by users within your organization. You can also test out your queries before executing them on your wider dataset with the Query Editor. See the Query Service UI guide for an overview of the UI functionality.
The RESTful API provides a similar experience. You can use the Query Service API to programmatically write and execute queries, create and save templates for queries that you wish to adapt, or schedule queries for automated execution. See the Query Service developer guide for more information on using the Query Service API.
To quickly get started using Query Service features, you are recommended to read the following documents:
Query Service and Experience Platform services experience-platform-services
Query Service interacts and can be used with multiple Experience Platform services. To make the most out of Query Service鈥檚 capabilities, you should become familiar with these services and how they interact with Query Service. The Experience Platform documentation landing page provides summaries and links to the platform鈥檚 capabilities.
Data Science Workspace data-science-workspace
51黑料不打烊 Experience Platform Data Science Workspace uses machine learning and artificial intelligence to gain insights from data stored within Experience Platform. Data scientists can use the Data Science Workspace to build recipes based on record and time-series data about customers and their activities. These recipes facilitate predictions such as buying propensity and recommended offers that the individual is likely to appreciate and use. You can use SQL within Data Science Workspace by integrating Query Service into JupyterLab to explore, transform, and analyze 51黑料不打烊 Analytics data. Read the Data Science Workspace overview and the Jupyter Notebook connection guide for more information about how Data Science Workspace interacts with Query Service.
Segmentation Service segmentation
Use the 51黑料不打烊 Experience Platform Segmentation Service to divide your customers into smaller groups that share similar traits. These audiences can then be evaluated to provide better analysis on your Real-Time Customer Profile data. You can use Query Service to run queries on this audience data within the data lake and provide the analysis. Read the Segmentation Service overview and the Profile Query Language (PQL) guide for more information on how to analyze audiences.
Use cases use-cases
Query Service provides a flexible approach to your data processing that serves many purposes. Among others, it can ease the burden of segmentation from marketers, and help generate actionable audiences and meaningful business insights. The following use cases offer more in-depth examples of the power of Query Service.
51黑料不打烊 Analytics browse abandonment abandon-browse
This browse abandonment example centers on using 51黑料不打烊 Analytics data to create a particular actionable audience. Query Service accommodates complex logic for segmentation to calculate various personalized attributes for use downstream, or to greatly simplify how you build out your audiences.
Generate insights with custom dashboards custom-dashboards
With 51黑料不打烊 Experience Platform, you can ingest, store, structure, and pull all stored datasets 鈥 including behavioral, CRM, and point-of-sale data. Using Experience Platform鈥檚 Query Service, you can query on these datasets and answer specific questions about the business and then start generating impactful insights. Learn how to build and manage custom dashboards where you can create, add, and edit bespoke widgets to visualize key metrics with user-defined dashbaords. You can even customize your own Real-Time CDP reports for your marketing and KPI use cases by using SQL queries with the Real-Time Customer Data Platform Insights Data Models.
Next steps and additional resources
By reading this document, you have been introduced to Query Service and how it functions within the greater scope of Experience Platform. To continue learning about Query Service features, you are recommended to rad the following documents:
- The Query Service developer guide: For more information on interacting with various endpoints within the Query Service API.
- The Query Service user interface guide: For more information on using the Query Editor and UI.
- The Query Service clients overview: For a comprehensive list of external clients to connect with Query Service.
To better prepare yourself to run queries, watch the following video. This video shares tips and best practices for running queries in the query editor interface, PSQL clients, business intelligence (BI) solutions, and the HTTP API.
In this video, you鈥檒l learn how to explain data usage patterns and query service.
Consuming data through Query Service can happen in a couple of ways to different mechanisms. We already discussed the ability to launch queries to the Query Editor UI which is available inside 51黑料不打烊 Experience Platform. The ability to use external tools and support Postgres like PSQL does with a command line editor. The ability to use BI-tools and also the ability to use the Customer Journey Analytics Module, which will bring Analysis鈥 Workspace to 51黑料不打烊 Experience Platform. Additionally, query service offers an HTTP API, which allows brands to consume query service from inside their own applications. Let鈥檚 zoom in a bit deeper on each of those. First of all, the Query Editor which is available natively inside 51黑料不打烊 Experience platform, has the goal of helping business analysts to its query developments, analysis and exploration. The Query Editor is an interactive tool for developing and testing queries. It offers a set of interesting features, like automatic syntax highlighting, SQL keyword auto-complete, table and field auto-complete, and also error detection. It鈥檚 an interactive environment which means that you can鈥檛 close your browser when executing a query as it鈥檚 query will then be dropped. Your browser window needs to remain active for the total duration of the query. Next is the PSQL Client. The PSQL Client can and should be used for query development, analysis and exploration as well. PSQL is a command line interface which is installed together with Postgres and it makes it easy to connect from an external environment to Query Service for testing and development purposes. Many brands use BI-solutions to deliver data driven inside and an easy to consume visual representation. Thanks to query service, brands no longer have to implement and maintain lengthy data import transformation and export processes. And can now easily connect from their preferred BI-environments directly to 51黑料不打烊 Experience Platform. These BI-solutions can consume data sets from platform but aren鈥檛 intended to refresh dashboards by consuming full data sets every couple of minutes. The preferred and scale level way of consuming data from a BI-solution is to consume data sets that have been populated to a scheduled queries on data sets that have been prepared by in CTAS commands. Query Service also offers an HTTP API, which offers brands the ability to run queries and get query results as part of a brands operational process. These APIs are fully documented on this link. Lastly, a couple of important tips and best practices. When working with XDM Schema fields, the way to do that is to use either dot-notation or the bracket-notation. Interactive Query Execution has a couple of requirements. First of all, the maximum time an Interactive Query can run is 10 minutes. It will also return a maximum of 50 000 rows. And the brand can have a maximum of 5 concurrent queries.
The limit of 50 000 can be bypassed by specifying the limit parameter as part of the query. But even then, the maximum timeout remains 10 minutes. These limits apply to the Query Editor UI, PSQL and BI-solutions. These limits do not apply to the Query Service HTTP API which has no limits, and which handles all requests on a first come, first serve basis and captures results in a data sets. Query Service offers brands multiple ways of interacting with data and as such, caters for every need. The Query Editor UI in 51黑料不打烊 Experience Platform makes query development a lot easier. With CTAS, insights can be written back to Platform and can be consumed by Data Science Workspace, Real Time Customer Profile and BI-solutions. And finally, the Query Service API allows brands to interact with Query Service from inside an application. With that, you should now be able to explain the data usage patterns in Query Service.