<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Cube Dev - Medium]]></title>
        <description><![CDATA[Cube Dev news and updates - Medium]]></description>
        <link>https://medium.com/cube-dev?source=rss----cfc9f21a543a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Cube Dev - Medium</title>
            <link>https://medium.com/cube-dev?source=rss----cfc9f21a543a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 12:17:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/cube-dev" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Views for metrics governance]]></title>
            <link>https://medium.com/cube-dev/introducing-views-for-metrics-governance-54b9035f01f6?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/54b9035f01f6</guid>
            <category><![CDATA[semantic-layer]]></category>
            <category><![CDATA[cubejs]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[metrics-and-analytics]]></category>
            <category><![CDATA[data-modeling]]></category>
            <dc:creator><![CDATA[Jonathan E Cowperthwait]]></dc:creator>
            <pubDate>Thu, 13 Oct 2022 14:47:02 GMT</pubDate>
            <atom:updated>2022-10-13T14:48:41.586Z</atom:updated>
            <content:encoded><![CDATA[<h4>Our biggest update to Cube’s data modeling layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zOdi8j3wfxy4qM6ZWJFLA.png" /></figure><p>Since we open-sourced Cube in 2019, we’ve added quite a few new features, such as our <a href="https://cube.dev/blog/expanded-bi-support">new SQL API</a>, and integrations, such as our recently-announced <a href="https://cube.dev/blog/headless-bi-with-streaming-data">support for streaming databases</a>. However, we haven’t changed our core <a href="https://cube.dev/blog/open-source-data-modeling">data modeling layer</a> — until now.</p><p><strong><em>Today, we’re announcing a new feature in Cube’s data model: views. We’ll </em></strong><a href="https://cube.dev/events/using-cube-views-for-metrics-management"><strong><em>host a webinar</em></strong></a><strong><em> on November 2 to have an in-depth conversation about views. Please RSVP!</em></strong></p><p>Designed to sit on top of the data graph of cubes, views create a façade of your whole data model with which data consumers can interact. They’re the place to define metrics, manage governance and data access, and control ambiguous join paths.</p><h3>Why views? Why now?</h3><p>As the <a href="https://cube.dev/blog/headless-bi">headless BI</a> platform, Cube helps define and maintain metrics definitions. The fundamental constraint is that metrics should make sense for every downstream application (solved by Cube’s SQL API) and every business user at the same time. They should represent substantial entities in a user’s business domain and not be obscured by any tool in the data stack. However, we have to admit there’s an <a href="https://benn.substack.com/p/ghosts-in-the-data-stack">open debate</a> whether metrics should only describe tangible, real-world entities like <em>users</em> or <em>orders</em> or they’re also allowed to reflect more ephemeral concepts like <em>sales funnel</em>, <em>recurring revenue</em>, or <em>storage quota usage</em>.</p><p>We’re introducing views so Cube’s users are well-equipped to build fully semantic layers, i.e., expose metrics that make sense in the business domain at all times and don’t include anything obscuring or unnecessary. Using an analogy from software engineering, views allow to define the “public API” on the surface of your semantic layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NAXan97nGp4kyQdW" /></figure><p>Over the past years, we’ve accumulated a lot of feedback across many use cases that has boiled down to these three questions:</p><ul><li>How should single-measure metrics be defined?</li><li>How should you manage the visibility of cubes to, e.g., restrict access for specific data consumers?</li><li>How can you control the join path within the data graph?</li></ul><p>We’ve designed views to tackle these and many other use cases. Now, let’s take an in-depth look at them. (It’s worth noting that, if you’re familiar with Looker and LookML, you can find some similarities between views and Looker’s <a href="https://cloud.google.com/looker/docs/reference/param-explore-explore">explores</a>.)</p><h3>Defining metrics with views</h3><p>Views with a single measure can be used to define metrics.</p><p>Here’s a simple example that demonstrates the relationship between a view and its underlying cubes. To define a metric with a view, pick a measure from your data model together with the dimensions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pAN6XkWQh28AHwpr" /></figure><p>You can use the <a href="https://cube.dev/docs/schema/reference/view#parameters-includes">includes</a> property to bulk add measures or dimensions to a view or define specific member as a reference in case you need more control, e.g., to rename the dimension.</p><pre>view(`ActiveUsers`, {<br>   description: `14 days rolling count of active users`,<br>   includes: [<br>     // Measure<br>     Users.rollingCount,<br>     // Dimensions<br>     Users.isPaying,<br>     Users.signupDate<br>   ],</pre><pre>   dimensions: {<br>     companyName: {<br>       sql: `${Company.name}`,<br>       type: `string`<br>     }<br>   }<br>});</pre><p>Within a view, you can use expressions to define a new metric that’s derived from calculations of one or more measures:</p><pre>view(`OrdersMargin`, {<br>   description: `Total margin of completed orders`,<br>   measures: {<br>     margin: {<br>       sql: `${Orders.revenue} - ${Orders.costOfGoodsSold}`,<br>       type: `number`,<br>       filters: [<br>          { sql: `${Orders.status} = &#39;completed&#39;` }<br>       ]<br>     }<br>   },</pre><pre>   includes: [<br>     Orders.date,<br>     ProductCategory.categoryName<br>   ]<br>});</pre><p>You can query these metrics views via REST or SQL API the same way you query cubes. In Cube’s SQL API, views are exposed as tables in which measures and dimensions are columns.</p><pre>SELECT<br>   margin,<br>   categoryName<br>FROM OrdersMargin<br>GROUP BY 2</pre><blockquote>Curious about YAML? We have seen a lot of requests to support YAML for data modeling, and we’re planning a release later this year. Please stay tuned for updates and <a href="https://forms.gle/4CZRRKK8nD4PvtxZA">reach out to us</a> if you’d like to sign up for early access to YAML support.</blockquote><h3>Managing visibility and governance</h3><p>Views can help you manage visibility of your data model through the <a href="https://cube.dev/docs/schema/reference/view#parameters-shown">shown</a> property. Some data may be available only to specific roles within an organization or to specific customers.</p><p>In the example below, we’re making the ARR view only visible to users with finance permissions:</p><pre>view(`ARR`, {<br>   description: `Annual Recurring Revenue`,<br>   shown: COMPILE_CONTEXT.permissions[&#39;finance&#39;],<br>   includes: [<br>     Revenue.arr,<br>     Revenue.date,<br>     Customers.plan<br>   ]<br>});</pre><p>You can also use the shown property to manage visibility of the specific measures and dimensions based on the users’ permissions.</p><h3>Controlling join paths</h3><p>Sometimes your data model may feature more than one way to join two cubes. The schema below illustrates a simplified example of that case, where the Countries cube can be accessed from Orders either directly or via the Users cube.</p><p>The join path is a part of your semantic model since it affects the meaning of calculations. In the example below, we can look either at an order’s warehouse country or the country of the user who placed the order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OkZD-j35t0-xiiqT" /></figure><p>Use views to control the join path. In the example below, we are creating two dimensions with the same Countries cube and name dimension, but with different semantic meaning because of the join path.</p><pre>view(`CompletedOrders`, {<br>   description: &#39;Count of completed orders&#39;,<br>   measures: {<br>     count: {<br>       sql: `${Orders.count}`,<br>       type: `number`,<br>       filters: [<br>          { sql: `${Orders.status} = &#39;completed&#39;` }<br>       ]<br>     }<br>   },</pre><pre>   dimensions: {<br>     orderWarehouseCountry: {<br>       sql: `${Orders.Countries.name}`,<br>       type: `string`<br>     },<br>     userCountry: {<br>       sql: `${Orders.Users.Countries.name}`,<br>       type: `string`<br>     }<br>   }<br>});</pre><h3>Available now</h3><p>Views are available in both <a href="https://github.com/cube-js/cube.js">Cube Core</a> and <a href="https://cube.dev/cloud">Cube Cloud</a> starting from <a href="https://github.com/cube-js/cube.js/releases/tag/v0.31.0">version 0.31</a> (<a href="https://cube.dev/docs/schema/reference/view">see docs for details</a>). However, they’re optional: if you don’t need them, don’t use them.</p><p>Views can be very helpful to develop and maintain large data models or provide governance for many data consumers, but they may be overkill for smaller projects.</p><p>In addition to the three cases detailed here, we believe views will enable many additional opportunities, so we’re eager to see how you use them. Please <a href="https://slack.cube.dev/">get in touch</a> with your feedback, questions, and examples.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54b9035f01f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/introducing-views-for-metrics-governance-54b9035f01f6">Introducing Views for metrics governance</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Embedded Analytics with Tableau and Cube]]></title>
            <link>https://medium.com/cube-dev/embedded-analytics-with-tableau-and-cube-1f46f79e9f96?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/1f46f79e9f96</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[embedded-analytics]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[headless-bi]]></category>
            <category><![CDATA[uxui-design]]></category>
            <dc:creator><![CDATA[Tamar Barlev]]></dc:creator>
            <pubDate>Thu, 22 Sep 2022 19:11:20 GMT</pubDate>
            <atom:updated>2022-09-22T19:11:19.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hIDTDOcSzMgWpzVr" /></figure><p>These days, customer-facing analytics are everywhere.</p><p>We are, after all, in The Data Age — hence why you’re reading this blog and why we’re writing it. And because of the ubiquity of data, as consumers, we’ve become extraordinarily curious; we want to know everything about our businesses, investments, and lap times.</p><p>Consumers are pining for insights — presented in fast-loading, beautifully customized dashboards. And so, many companies are turning to embedded analytics with <a href="https://www.tableau.com/">Tableau</a>.</p><p>But as more consumers demand analytics, raising the standards of UI customization, interactivity, and speed, what if there were a more tailored, more performant way to give users the insights they need?</p><p>Well, there is: embedded analytics with Tableau and <a href="https://cube.dev/">Cube</a>. Let’s explain.</p><h3>What is Embedded Analytics?</h3><p>Simply put, <a href="https://cube.dev/blog/what-is-embedded-analytics">embedded analytics</a> is the practice of integrating data analytics and visualization capabilities with a user’s natural workflow, such as their web portals, internal tools, or applications.</p><p>For example: with embedded analytics, rather than needing to export sales data from their e-commerce platform and then conduct analysis separately in Excel, a seller could derive insights from dashboards and reports available to them directly within their commerce portal.</p><p>Of course, embedded analytics <strong>can be used in internal- and external-facing applications to provide real-time static and interactive reports, dashboards, and data visualizations</strong>.</p><p>There are many benefits of using embedded analytics. First, it can <strong>save the user time and effort</strong> and add a lot of value. In turn, this saved time and gleaned insights <strong>contribute to a user-centric UX that drives adoption</strong> — even among those who aren’t as analytics-experienced. And higher adoption means a <strong>better ROI on internal tooling</strong> and an <strong>increase in revenue for external tooling</strong>.</p><h3>Embedded Analytics with Tableau</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*huBQPMvlnTT-8W1p" /></figure><p>So, why do so many companies turn to <a href="https://www.tableau.com/products/embedded-analytics">embedded analytics with Tableau</a>?</p><p>Tableau is one of the leading platforms for data visualization and dashboarding. It’s based on its own VizQL, which expresses data visually by translating drag-and-drop actions into data queries.</p><p>This drag-and-drop capability makes data analytics and business intelligence accessible to a much wider pool of people — which is a great thing. Clearly, given its smashing success, Tableau met a hot demand for data democratization and did it well.</p><p><em>However</em>, things get a little more hinky when it comes to the <a href="https://cube.dev/blog/modern-embedded-analytics">embedded analytics stack</a>. This is because users not only use Tableau for analytics within Tableau itself but also use it to power embedded analytics within other applications.</p><p>The problem is that <strong>having your embedded analytics with Tableau sit directly on top of your data warehouse comes with a few shortcomings</strong>, such as:</p><ol><li>Difficulty with customizability and designing user-centric UIs</li><li>Duplicated effort and opportunities for inconsistency when creating multiple sets of data definitions and security contexts</li><li>Weaker analytics performance</li></ol><h3>1) Difficulty with customizability and designing user-centric UIs</h3><p>Tableau has many visualization layer options, but it just doesn’t have one for every audience or use case. You can undoubtedly brand the Tableau visualizations embedded in your app; however, there are restrictions on what you can build with the visualization layers Tableau offers (e.g., extremely use-case-specific drill-downs).</p><p>And so, <strong>Tableau’s visualization templates may work just fine for 80% of your applications, but those that truly need a highly tailored, custom UI will require you to build a custom presentation layer from scratch</strong>.</p><p>The problem is that using multiple different visualization layers together with Tableau — meaning, both custom-built and from Tableau — leads to…</p><h3>2) Duplicated effort and opportunities for inconsistency</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xkTOsrMyPnxpX5Cy" /></figure><p>So you want to use Tableau and a separate charting library to build a custom presentation layer? That makes perfect sense when you want to combine the advantages of Tableau’s presentation layers with the flexibility of a custom UI.</p><p>However, the challenge lies in consistently orchestrating data modeling, security, and caching across all of your presentation layers.</p><p><strong>By connecting multiple presentation layers to your data warehouse, you’ll need to individually orchestrate your data models and access controls so they’re uniformly defined</strong>. That’s a lot of duplicated effort — which opens the door to gaps and errors.</p><h3>3) Weaker analytics performance</h3><p>Lastly, powering embedded analytics with Tableau without a BI layer between Tableau and the data warehouse can cause latency in your user-facing visualizations and dashboards.</p><p>Latency is a true user adoption killer: a Google study showed that <a href="https://www.thinkwithgoogle.com/marketing-strategies/app-and-mobile/mobile-page-speed-new-industry-benchmarks/">bounce likelihood increased by 32%</a> when a page’s load time increased from one second to three, and by <em>90%</em> when page load time increased from one to five seconds. So, performance is essential.</p><p><strong>In a stack in which Tableau’s presentation layer sits directly on top of your data source, your users request data from the data source for every query</strong>. At best, <strong>this is redundant and costly</strong>, as multiple users may be requesting the same information.</p><p>At worst, however, building a stack like this <strong>can result in latency and lower performance</strong>. Request volume across users is unpredictable; you can’t control how many people simultaneously request data or consume visualizations. And so, if you have multiple presentation layers, each with duplicate data modeling, security, and caching layers, each making separate and redundant requests directly of the data source — that opens the door to latency.</p><p>Latency can be a problem even if you only use Tableau (don’t worry, we happen to have <a href="https://cube.dev/cloud">a fix</a>). But, with multiple presentation layers, the chance of uneven performance across them is much higher.</p><h3>The best of both worlds: embedded analytics with Tableau and Cube</h3><p>Alright — let’s get to the solution.</p><p>Tableau is a fantastic tool (in fact, here’s <a href="https://cube.dev/blog/tableau-tutorial">how to use Tableau with Cube</a>.) Combining it with custom presentation layers is a great way to get both efficient, out-of-the-box visualizations and user-centric UI for your embedded analytics.</p><p>So how can you fix the issues above? With upstream, centralized data modeling, security, and caching orchestration. Hi, we’re <a href="https://cube.dev/cloud">Cube</a>.</p><h3>Cube streamlines building embedded analytics with Tableau and custom presentation layers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ku07eoEnJ2rodaZo" /></figure><p>Cube is a <a href="https://cube.dev/blog/headless-bi">headless BI</a> platform that enables your data modeling, data access control, and caching layers to live upstream of every presentation layer and data application in your stack.</p><p>So, rather than individually orchestrating r<a href="https://cube.dev/docs/recipes/role-based-access#enforcing-role-based-access">ole-based access controls</a> or metrics definitions for each presentation layer, you’re centralizing and defining them once — removing duplicated effort and its inevitable inconsistencies.</p><h3>Cube ensures uniformly performant embedded analytics powered by Tableau and custom presentation layers</h3><p>Cube’s robust caching layer manages the throughput of data requests and acts as a buffer between your data source and your data application. Its advanced <a href="https://cube.dev/docs/caching#pre-aggregations">pre-aggregation capabilities</a>, query queue, and <a href="https://cube.dev/docs/caching#in-memory-cache-refresh-keys">refresh keys</a> protect your data warehouse from redundant, costly, and latency-causing queries.</p><p>Designed to protect the data source from the possibility of even an unlimited number of concurrent requests, Cube can significantly speed up your embedded Tableau dashboards and visualizations.</p><p>Cube also makes embedded analytics more performant even when built with a combination of Tableau and custom presentation layers. By allowing Cube to do the heavy lifting of data modeling, security, and caching orchestration, the presentation layers become very “thin” — essentially, not needing to process much. This enables them to become uniformly performant and allows the application’s embedded analytics to become more performant as a whole.</p><h3>Learn More</h3><p>Interest piqued? We thought it might be.</p><p>Give your users a performant, data-rich embedded analytics experience with Tableau and Cube — especially since <a href="https://cube.dev/cloud">Cube is free to use</a> and we already have a <a href="https://cube.dev/blog/tableau-tutorial">tutorial for using Tableau with Cube</a>.</p><p>Get in touch with us and the rest of the Cube community on <a href="https://slack.cube.dev/">Slack</a> or <a href="https://github.com/cube-js/cube.js">Github</a>.</p><p>In the mood for some hands-on help with building a modern embedded analytics data stack? <a href="https://cube.dev/contact">Schedule a time to chat with us 1:1</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f46f79e9f96" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/embedded-analytics-with-tableau-and-cube-1f46f79e9f96">Embedded Analytics with Tableau and Cube</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Headless BI with streaming data]]></title>
            <link>https://medium.com/cube-dev/headless-bi-with-streaming-data-83658ee31c50?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/83658ee31c50</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[cube]]></category>
            <category><![CDATA[kafka-streams]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[streaming]]></category>
            <dc:creator><![CDATA[Jonathan E Cowperthwait]]></dc:creator>
            <pubDate>Thu, 22 Sep 2022 15:02:18 GMT</pubDate>
            <atom:updated>2022-09-22T15:02:18.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Sp4vTHkOfTKVNJG9eYrhQ.png" /></figure><p>Demand to make data operational and real-time is ever-growing. Both consumers and enterprises expect applications to react to changes in real time, and be proactive with intelligent notifications and alerts.</p><h3>How can Cube help?</h3><p>At Cube, our primary <a href="https://cube.dev/docs/config/databases">sources of data</a> have been cloud data warehouses with batched data — but since our first days, we have wanted to work with streaming data too. Our ambition has been to create a seamless experience for data engineers to build applications on top of a single, headless data access layer, regardless of whether the data is a stream, a batch, or a union of both.</p><p>Today, we’re happy to announce a major step in building streaming support into Cube, and to share our plans for what’s next.</p><blockquote><strong>We are hosting an online event to reveal these features. </strong><a href="https://cube.dev/events/building-real-time-streaming-data-applications-with-cube"><strong>Register now</strong></a><strong> to join us on October 13.</strong></blockquote><h3>The challenge</h3><p>Historically, it has been hard to work with truly real-time data. Specifically, it’s been challenging to combine historical and real-time data. For example, in use cases such as notifications or recommendations, we can’t rely <em>only</em> on last-minute data; we need to look back to run analysis, and then act in real-time, based on <em>both</em> the most recent data and historical trends.</p><p>There’s also the concern of needing to master unique languages for specific data sources; in the past, it often was necessary to build one-off integrations for each streaming application to accommodate real-time streams.</p><h3>The opportunity</h3><p>Streaming data enables a variety of use cases, including real-time, in-product analytics; automation; personalization; and alerting. Fortunately, recent innovations have made it easier for us to accommodate real-time streams.</p><p>In the last few years, streaming SQL technologies such as <a href="https://ksqldb.io/">ksqlDB</a>, <a href="https://materialize.com/">Materialize</a>, and <a href="https://flink.apache.org/">Apache Flink</a> have significantly progressed. These technologies enable us to process streaming data and run analysis with SQL — without needing to learn a new language or build specific language-unique integrations.</p><h3>ksqlDB support</h3><p>We’re excited to announce that <strong>it’s now possible to use Cube to build data modeling, caching, and access control layers on top of streaming SQL</strong>, just as you can with data from cloud data warehouses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pffSDwCJGKhSR46d" /></figure><p>Cube now can connect to streaming SQL engines and expose streaming data via our REST, GraphQL, and SQL APIs to your downstream applications. Our REST API already supports websockets and provides a seamless experience for developers and data engineers to build real-time data apps. Our data modeling, caching, access control, and querying APIs are the same whether you work with streaming or batch data.</p><p>Want to see it in action? <a href="https://ksql-demo.netlify.app/">Check out our live ksqlDB demo application</a> featuring a real-time dashboard built with Kafka, ksqlDB, and Cube.</p><p>That alone opens many opportunities for building on top of streaming data, but we’re also committed to addressing the complex problem of merging batch and streaming data, so that we can provide a single interface for unioned data.</p><h3>Lambda architecture support</h3><p>We’re also introducing <a href="https://cube.dev/docs/caching/pre-aggregations/lambda-pre-aggregations">lambda pre-aggregations</a>. These follow the <a href="https://en.wikipedia.org/wiki/Lambda_architecture">lambda architecture</a> design to create a union of streaming and batch data. Cube pre-aggregates batch data from the cloud data warehouse into one pre-aggregation, data from streaming SQL engines into another, then unites these pre-aggregations during query processing — so we can return merged data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S3cg7naXSnypyQlD" /></figure><p>For developers or data consumers, the interface remains the same — REST, GraphQL, or SQL queries. Our Lambda architecture makes it possible to consume data as a single dataset regardless of whether it is streaming, batch, or combined data.</p><p>Cube hides the complexity of this architecture within our data modeling layer, and therefore significantly simplifies the data consumption process. In addition, our access control and security layers are applied using the same rules as you’ve configured them for batched data.</p><h3>Coming next</h3><p>Naturally, our work isn’t done yet. The above features are generally available soon — and available today to Cube users who request access. Soon, you’ll also have access to</p><ul><li>Materialize streaming pre-aggregations</li><li>Flink SQL support</li><li>Spark Streaming support</li></ul><p>If you’re interested in early access to these features, to help influence their development and craft the future of streaming headless BI, simply <a href="https://cube.dev/contact">get in touch</a>.</p><h3>Everything you need to build powerful real-time applications</h3><p>We’re excited to launch our Kafka and ksqlDB integration and lambda pre-aggregations today because these bring the power and simplicity of our headless BI architecture to new types of data applications.</p><p>These innovations are available to everyone, for free: <a href="https://cube.dev/contact">request ksqlDB preview access</a>, connect a real-time data source, then (please!) give us your feedback.</p><p>We look forward to powering the next generation of data applications — we can’t wait to see what you build.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83658ee31c50" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/headless-bi-with-streaming-data-83658ee31c50">Headless BI with streaming data</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are data apps?]]></title>
            <link>https://medium.com/cube-dev/what-are-data-apps-ff600b9563db?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/ff600b9563db</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[modern-data-stack]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[app-data]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Tamar Barlev]]></dc:creator>
            <pubDate>Wed, 14 Sep 2022 00:19:26 GMT</pubDate>
            <atom:updated>2022-09-14T00:19:26.573Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WPJxuc3zl367p0G8" /></figure><p>Previously, we’ve <a href="https://cube.dev/blog/headless-bi">described the parts of headless BI</a>, taken an <a href="https://cube.dev/blog/open-source-data-modeling">in-depth look at the data modeling layer</a>, and explored one use case for headless BI: <a href="https://cube.dev/blog/what-is-embedded-analytics">embedded analytics</a>. This week, let’s take a step back and look at the category of data applications.</p><p>But first…</p><h3>What are data applications?</h3><p>“Data apps” is an umbrella term for a category of interactive tools that use data to deliver insight or automatically take action. When we talk about data apps, we frequently cite the examples of recommendation engines, data visualization built into applications, and customized internal reporting tools for business teams.</p><h3>Isn’t this just embedded analytics?</h3><p>Embedded analytics takes the kind of exploration that used to happen in dashboards and legacy BI tools, and injects it directly into the applications that internal teams and external customers already use. Headless BI facilitates building embedded analytics more quickly. But embedded analytics is just the beginning.</p><p>Despite being more accessible and customized than traditional dashboards, embedded analytics is still primarily a tool for data exploration. By contrast, data applications are capable of data explanation: highlighting trends, surfacing insights, making recommendations. This type of application entails a dynamic, purpose-built user experience, and it is typically developed by software and data engineers, not business analysts.</p><h3>What are some use cases of data applications?</h3><p><strong>The first type of data applications is an embedded data app.</strong> Think of this as the evolution of embedded analytics, but unlike embedded analytics’ static dashboards, embedded data features tend to be highly customized, dynamic, and purpose-built. These applications surface insight within the native user experience of another application.</p><p><strong>A business’s internal data products and portals are a second kind of data applications.</strong> Unlike traditional or embedded exploration dashboards, this type of data application is purpose-built for a specific business unit, and is built with relevant business context. These applications’ custom interactivity allows business users to receive insights without mastering data analysts’ workflows.</p><p><strong>The third type of data applications are end-consumer-facing applications.</strong> These may be built for customers, partners, or shareholders, and they are not dissimilar from internal applications — but they tend to require a finer level of design polish and customization. Additionally, this type of app must be built for higher performance, reflecting consumers’ expectations of speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rbqqPacWvDMKVkrG" /></figure><h3>How are data applications built?</h3><p>By their nature, data apps require recourse to large quantities of data. This has been made possible by the rise of the cloud data warehouse and an ever-growing ecosystem of data ingestion, governance, transformation, and orchestration tools.</p><p>But given their complexity and power, data apps generally are built by engineering teams, and they require integration with modern engineering workflows, including version control, testing, and continuous integration and deployment practices.</p><h3>Building from scratch</h3><p>Embedding data app functionality into a larger application generally requires building from scratch. What is the architecture of such a solution?</p><h4>Data store</h4><p>Naturally, a data application starts with the data — and the basis of the modern data stack is the cloud data warehouse. This can be a general purpose data warehouse like <a href="https://snowflake.com/">Snowflake</a> or a real-time tool like <a href="https://www.firebolt.io/">Firebolt</a>, <a href="https://clickhouse.com/">ClickHouse</a>, or <a href="https://materialize.com/">Materialize</a>.</p><h4>Headless BI layer</h4><p>A crucial component of a data app is the <a href="https://cube.dev/blog/headless-bi">headless BI layer</a>. Specifically, a major piece of this is <strong>access control</strong> integrated with the warehouse’s security controls, because embedded analytics always require multitenancy. A second piece is <strong>advanced caching</strong>. This is because the data warehouse is a great candidate for a backend, but itself does not support highly concurrent queries with sub-second latency that modern data consumers expect.</p><p>The BI layer is also where <strong>data modeling</strong> is handled, to ensure that a data app’s users consume the same data definitions as users of other internal or external applications. Data modeling and metrics definition should be handled once, and this must be up-stack from every application or dashboard.</p><p>Data is then made available via diverse APIs — e.g., SQL, GraphQL, and REST — to be consumed by…</p><h4>A hybrid presentation layer</h4><p>For the high customization expected of an embedded data application, and when front-end teams are looped in, different charting libraries can be used. These range from <a href="https://d3js.org/">D3</a> to <a href="https://www.chartjs.org/">Chart.js</a> and <a href="https://www.highcharts.com/">Highcharts</a>. These most likely will be natively integrated with frontend application frameworks like <a href="http://react/">React</a> or <a href="https://angularjs.org/">Angular</a>.</p><h3>Working with a framework</h3><p>For the second and third types of data applications, the initial layers of the data stack are the same — i.e., the base layer is a data warehouse, followed by a headless BI layer for data modeling, access control, caching, and application APIs.</p><p>For the user interface, however, there’s typically less customization required. This creates the opportunity to take advantage of the new category of no code / low code tools like <a href="https://www.appsmith.com/">Appsmith</a> and <a href="https://retool.com/">Retool</a>, which can be used to quickly build analytics interfaces.</p><p>There also are data application frameworks that are helpful here: tools like <a href="https://plotly.com/dash/">Plotly Dash</a> and <a href="https://streamlit.io/">Streamlit</a> make it possible to turn data scripts into shareable web applications without the need for front-end development.</p><h3>What’s next?</h3><p>As it gets easier to build customized experiences, the number and types of data apps will proliferate — but the use case for a basic dashboard-centric experience won’t go away. There will always be cases where needs are best met with traditional charts, or when the quick turnaround requires making something available without tapping engineering resources for help. For these, embedded analytics are and will remain the best choice.</p><p>What’s exciting, though, is all of the new opportunities that the modern data application stack makes available. Opportunities for working with ever greater quantities of data, with ever greater complexity, will only grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff600b9563db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/what-are-data-apps-ff600b9563db">What are data apps?</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Embedded Analytics?]]></title>
            <link>https://medium.com/cube-dev/what-is-embedded-analytics-ed556ed7c0b9?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/ed556ed7c0b9</guid>
            <category><![CDATA[headless-bi]]></category>
            <category><![CDATA[embedded-analytics]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[customer-experience]]></category>
            <dc:creator><![CDATA[Tamar Barlev]]></dc:creator>
            <pubDate>Thu, 08 Sep 2022 23:12:53 GMT</pubDate>
            <atom:updated>2022-09-08T23:12:52.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D4VUvxXpHX6MHVuJ" /></figure><p>We’ve previously discussed the <a href="https://cube.dev/blog/modern-embedded-analytics">modern data stack for embedded analytics</a> — but what is embedded analytics? Let’s take a step back and review this popular category of data application.</p><h3>Embedded Analytics Definition</h3><p>Embedded analytics is the integration of data analytics and visualization capabilities within a user’s natural workflow — within internal tooling, web portals, and products like apps.</p><p>Such an integration enables users to conduct analytics directly inside the applications they use rather than having to switch between various applications to get insights.</p><p>Let’s illustrate with an example: a seller on an e-commerce platform, “TrapezoidSpace,” would like insights about their revenue.</p><p>Without embedded analytics on the e-commerce platform, the seller would have to manually request a sales report from the e-commerce platform, import it into secondary analytics software, then work with the data to get the necessary insights.</p><p>However, with embedded analytics, they could get the insights they need with a real-time dashboard visualizing revenue presented to them directly within the e-commerce platform.</p><h3>Embedded Analytics Use Cases</h3><p>There are many use cases for embedded analytics. We can divide them by the end users and the types of information they present.</p><h3>External vs. Internal Embedded Analytics</h3><p>Embedded analytics can be internal-facing — meaning the end user is within an organization — or external-facing, meaning the end user is an organization’s customer.</p><p>Take our previous example of TrapezoidSpace: here, the seller is an external end-user of the platform’s embedded analytics features.</p><p>In contrast, let’s take the example of TrapezoidSpace’s customer success manager. They track the time-to-resolution of tickets (TTR) using a bespoke ticket management system that visualizes trends in TTR. That would be an example of internal-facing embedded analytics.</p><h3>Types of Embedded Analytics</h3><p>People use embedded analytics in many ways, but real-time reports and dashboards are the most common.</p><p><strong>Real-time static and interactive reports</strong> are tabular views of information with the ability to refine data by setting parameters and scheduling. In contrast, <strong>dashboards and data visualizations</strong> are charts and graphs that present and visualize metrics to make finding insights and trends easier.</p><h3>Embedded Analytics Benefits</h3><h3>Generally, embedded analytics contributes to a user-centric UX that adds value and drives adoption.</h3><p>Whether users are external or internal, the point of an investment in any tooling is to bring value and thereby drive the tool’s adoption. And, providing a user-centric design and seamless UX tailored to the target user is one of the only ways to get people to (willingly) use products.</p><p>So, conveniently locating BI and analytics functionality within the user’s workflow significantly enhances a product’s UX. Improved UX promotes the more effective use of the tool, creates greater value, and increases the tool’s adoption.</p><h3>Externally, embedded analytics increases revenue and competitive advantage.</h3><p>In a survey of project managers, developers, and executives, <a href="https://c6abb8db-514c-4f5b-b5a1-fc710f1e464e.filesusr.com/ugd/e5361a_76709448ddc6490981f0cbea42d51508.pdf">96% reported that embedded analytics contributes to revenue growth</a>. They credited this to better UX and their ability to add revenue streams based on highly sought-after functionalities.</p><p>Adding high-value capabilities to products allowed businesses to introduce tiered or subscription-based analytics services — opening the door to acquiring new customers and upselling to recurring ones.</p><h3>Internally, embedded analytics increases productivity and the accessibility of data-driven decision-making.</h3><p>The efficiency with which users can conduct analysis with embedded analytics significantly boosts time effectiveness (and, therefore, cost-effectiveness). With auto-generated dashboards and filtering capabilities, users can draw insights faster and avoid the cumbersome processes of manually pulling data and conducting analysis in separate applications.</p><p>Easy access to analytics also allows those with less experience in data analysis to make data-driven decisions. In a 2022 survey, <a href="https://www.techtarget.com/searchdatamanagement/feature/Improve-data-value-by-relying-on-economic-principles">92% of companies cited their biggest obstacle in becoming ‘data-driven’</a> as people, processes, and change management. However, a custom-built internal embedded analytics platform — one that is tailored to the team’s workflow — doesn’t require complex training in generic BI tools.</p><p>Rather than having to facilitate learning of generic BI tools which aren’t set in its work’s context, an organization can create tools that are already infused with the working context. And so, instrumenting intuitively tailored tools powered by embedded analytics removes training bottlenecks and dependencies — increasing productivity and value-add.</p><h3>Embedded Analytics vs. Business Intelligence</h3><p>The difference between embedded analytics and traditional business intelligence is simple. While traditional BI means you conduct your analytics in a separate set of tools, embedded analytics allows users to access insights in-app. Their data visualizations, dashboards, and reports live in the application in which they conduct operations, allowing for real-time refreshes and faster learning.</p><p>This contrast may seem somewhat minute, but it actually saves employees a lot of time — up to <a href="https://netstorage.ringcentral.com/documents/connected_workplace.pdf">5 hours</a> a week. These savings increase productivity, allow for constantly updated information, and streamline the entire analytics workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*42yEH_XvilIAW3JK" /></figure><h3>How Cube can help you power your Embedded Analytics</h3><p>Cube is a headless business intelligence tool that accesses data from <a href="https://cube.dev/docs/config/databases">raw data sources</a>, <a href="https://cube.dev/docs/schema/getting-started">models the data</a>, <a href="https://cube.dev/docs/caching">caches</a> query results, and makes the data available to downstream data applications via <a href="https://cube.dev/docs/rest-api">REST</a>, <a href="https://cube.dev/docs/backend/graphql">GraphQL</a>, and<a href="https://cube.dev/docs/backend/sql"> SQL APIs</a>.</p><p>“Headlessness” refers to tooling that separates its functionalities from the end user’s interface — making it the perfect basis for building branded and customizable embedded analytics for any application.</p><p>Cube is unique in that it provides a centralized, upstream semantic layer to define metrics, making all of the analytics it powers consistent and accurate. This semantic layer and its caching capabilities make sure that an application is performant and cost-effectively provides correct, up-to-date information to all of the users who access it.</p><p>Similarly, Cube’s centralized data access control supports <a href="https://cube.dev/docs/multitenancy-setup#multitenancy">multi-tenancy</a> and allows <a href="https://cube.dev/docs/recipes/role-based-access#enforcing-role-based-access">role-based</a> and <a href="https://cube.dev/docs/recipes/column-based-access#enforcing-column-based-access">column-based governance</a>, which ensures users are only accessing data appropriate to them. This type of security is especially crucial in external-facing embedded analytics, where many separate entities — for example, each seller on TrapezoidSpace — need to access their data and their data only.</p><p>Cube enables developers to build consistent, secure, and performant embedded analytics efficiently; dashboards in hours, not weeks.</p><p>It can be the foundation for building embedded analytics applications with its <a href="https://cube.dev/docs/config/downstream">compatibility with many popular front-end tools</a> and business applications. So many, in fact, that we built <a href="https://awesome.cube.dev/">a wiki about our favorite tools</a> in the modern data stack — including tools for building embedded analytics (aptly named “awesome.cube.dev”).</p><h3>Learn more</h3><p>Want to learn more about how to build embedded analytics applications with Cube or headless BI?</p><p>Get in touch with us and the rest of the Cube community on <a href="https://slack.cube.dev/">Slack</a> or <a href="https://github.com/cube-js/cube.js">Github</a>.</p><p>In the mood for some hands-on help with building a modern embedded analytics data stack? <a href="https://cube.dev/contact">Schedule a time to chat with us 1:1.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed556ed7c0b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/what-is-embedded-analytics-ed556ed7c0b9">What is Embedded Analytics?</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing expanded BI support with our SQL API]]></title>
            <link>https://medium.com/cube-dev/announcing-expanded-bi-support-with-our-sql-api-5d8c907e4962?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/5d8c907e4962</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[superset]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <dc:creator><![CDATA[Jonathan E Cowperthwait]]></dc:creator>
            <pubDate>Tue, 24 May 2022 05:37:58 GMT</pubDate>
            <atom:updated>2022-05-24T15:10:19.040Z</atom:updated>
            <content:encoded><![CDATA[<h3>Connect your favorite visualization tools to Cube.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*haJbQj5B9Y9u8LCYqzOrzQ.png" /></figure><p>Since we <a href="https://github.com/cube-js/cube.js/releases/tag/v0.3.5-alpha.0">launched our open source offering</a> in 2019, Cube has helped thousands of companies consume data from any data source, organize it into consistent definitions, and use it with data applications. Developers and data engineers have used Cube to build a thriving ecosystem of embedded analytics features and custom data applications.</p><p>However, it’s always been our ambition to make Cube’s power more accessible to a greater diversity of data consumers.</p><p>To get there, data needs to be consistent and performant not just for developers — but also for analysts and general business users. This requires bringing Cube into the tools where these users already work: namely, business intelligence tools such as Tableau, Superset, and Power BI.</p><p>Today, we’re proud to announce a major milestone in our efforts. Cube’s updated SQL API makes our headless analytics platform available to users of every BI application.</p><h3>Consistent data for every tool</h3><p>We first launched a <a href="https://cube.dev/blog/introducing-cube-sql">preview of Cube’s SQL API</a> late last year. Since then, we’ve been hard at work responding to your thoughtful feedback and adding support for ways specific BI applications generate SQL queries. Now, it’s possible to connect any data visualization and BI application to Cube via the Postgres SQL interface.</p><p>Now, an organization can configure Cube — once — to securely access data sources, define data models, and cache queries. After that, every data consumer across an organization can securely access Cube’s definitions and materializations using vastly simplified queries.</p><p>No matter which tool a team uses, everyone in the organization will see the same data definitions. ‘Total Orders’ will mean the same thing in executives’ dashboards, marketers’ campaign reports, and the finance team’s revenue models.</p><p>By abstracting away complex queries, Cube reduces the difficulty of exploring data with collaborative data tools and notebooks.</p><p>By centrally managing access to up-stack data stores, Cube consistently defines, enforces, and audits who can access what; this eliminates the duplicated effort and inherent risks of defining access control within each downstream tool.</p><p>And by managing query-level caching and aggregate tables, Cube reduces the bandwidth costs and degraded performance of directly, repeatedly querying raw data stores.</p><h3>Here comes Hydra</h3><p>We’ve already talked about <a href="https://cube.dev/blog/headless-bi">using Cube as a “headless” BI layer</a>. With our SQL API, now it’s easier than ever to connect all of your “heads.”</p><p>Everything you need to connect Cube to BI tools is available from Cube’s “Overview” window. Just click “How to connect your BI tool” to reveal connection details, then connect to Cube as a PostgreSQL data source from within your BI tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OvYTaqk1GYAWxbwW.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*khAqjJV1n0sBJOo7.gif" /></figure><p>Your <a href="https://cube.dev/docs/schema/fundamentals/concepts#cubes">cubes</a> will be exposed as tables, where both your <a href="https://cube.dev/docs/schema/fundamentals/concepts#measures">measures</a> and <a href="https://cube.dev/docs/schema/fundamentals/concepts#dimensions">dimensions</a> are columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TKsK1Vu6kFNScdX8.gif" /></figure><p>This makes it possible to query Cube as a data source from within your BI tool, ensuring consistent data for every data consumer.</p><figure><img alt="Querying Cube in Tableau" src="https://cdn-images-1.medium.com/max/1024/0*s-C7LPm1FOAYk5Sz.gif" /><figcaption><em>Querying Cube in Tableau</em></figcaption></figure><figure><img alt="Querying Cube in Superset" src="https://cdn-images-1.medium.com/max/1024/0*R0S0AT9TBqLtKkwE.gif" /><figcaption><em>Querying Cube in Superset</em></figcaption></figure><h3>Learn more</h3><p>The new SQL API is available in both the open source Cube tool and Cube Cloud, the managed Cube service hosted within select regions of the Google Cloud Platform and Amazon Web Services. You may sign up for a free Cube Cloud account at <a href="https://cube.dev/cloud">cube.dev/cloud</a>.</p><p>Interested in getting started? <a href="https://cube.dev/docs/config/downstream">See our guide to working with BI tools</a>.</p><p>Need help? Have feedback? We love hearing from you . <a href="https://slack.cube.dev/">Join the Cube Dev Slack community</a> or <a href="https://cube.dev/contact">drop us a line</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d8c907e4962" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/announcing-expanded-bi-support-with-our-sql-api-5d8c907e4962">Announcing expanded BI support with our SQL API</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Modern Data Stack for Embedded Analytics]]></title>
            <link>https://medium.com/cube-dev/the-modern-data-stack-for-embedded-analytics-b006c8ff6428?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/b006c8ff6428</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[cube]]></category>
            <category><![CDATA[embedded-analytics]]></category>
            <dc:creator><![CDATA[Jonathan E Cowperthwait]]></dc:creator>
            <pubDate>Thu, 12 May 2022 15:57:59 GMT</pubDate>
            <atom:updated>2022-05-12T15:57:59.249Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s how the embedded analytics data stack has changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xiRqXA87w2R4vu2V8QiSPA.png" /></figure><p>We’ve spent the past few weeks discussing <a href="https://cube.dev/blog/headless-bi">the composition of headless BI</a> and <a href="https://cube.dev/blog/open-source-data-modeling">Cube’s approach to open source data modeling</a>. Let’s briefly talk about where this technology meets the real world: embedded analytics.</p><h3>What is embedded analytics?</h3><p>Embedded analytics means much more than using iframes to place charts in a dashboard. The real promise of embedded analytics is <em>bringing rich data experiences to users where they already are</em>. As <a href="https://www.gartner.com/en/information-technology/glossary/embedded-analytics">Gartner</a> puts it, “data analysis occurs within a user’s natural workflow, without the need to toggle to another application.”</p><p>Financial analysis may be built right into a personal finance application. Personal health metrics can be displayed alongside one’s medical history. Every member of a team can see the business’s KPIs and trends without logging into a BI tool.</p><p>For businesses, embedded analytics affords full control over what data is available and how it’s presented. For data consumers, embedded analytics means finding useful insights within the sites or apps they already use — not in the same old dashboards.</p><p>At Cube, we’ve been on the embedded analytics front lines for years. Here are some recent technological and behavioral shifts we’ve observed.</p><h3>The rise of the cloud data warehouse</h3><p>In the past, collecting and processing massive data was so technically complex and expensive that only a few companies did so. Now, cloud data warehouses make it possible for organizations in every industry and of every size to easily and affordably collect and process more data. This has led to cloud data warehouses’ <a href="https://www.alliedmarketresearch.com/data-warehousing-market">huge adoption</a>.</p><p>But it is not enough to just collect lots of data. Businesses need to <em>use</em> the data, too. This has increased the need for customizable, powerful data experiences. As a result, companies’ adoption of cloud data warehouses has led to greater interest and investment in embedded analytics, too.</p><h3>Data consumers are more diverse</h3><p>At the same time as more businesses have taken interest in embedded analytics, there are also more, and more types of, data consumers. Business intelligence was once the purview of specialized engineers and analysts, but now, every member of an organization is expected to use and understand data to perform their job.</p><p>Who is the modern data consumer? For starters, they may be less technical. The modern data consumer <a href="https://benn.substack.com/p/ghosts-in-the-data-stack?s=r">may not be familiar with data engineering concepts like OLAP</a> — and they shouldn’t have to be. The modern data consumer may not even be familiar with legacy BI tools — and, again, they shouldn’t need to be.</p><p>To make data accessible and actionable for these data consumers, companies need to build customized user interfaces that move beyond mere iframed graphs. Embedded analytics applications have grown more polished and interactive.</p><h3>Front-end development is easier</h3><p>A major change in the world of embedded analytics is the rise of modern front-end development tools. In the past decade, there have been incredible advances in powerful, simple front-end technologies — particularly <a href="https://www.youtube.com/watch?v=7LMsR30p1xM">React</a>. It’s now easier than ever to design customized, polished user experiences.</p><p>This change hasn’t just made it easier to develop custom data experiences. It also has altered users’ expectations to make such experiences essentially mandatory. Both internal data consumers and end users have new, high standards for usability, richness, and responsiveness.</p><p>Since these expectations can’t be met with generic dashboards or out-of-the-box BI platforms, more companies are building customizable and performant embedded analytics features using modern front-end tools.</p><h3>There are new tools</h3><p>It’s become easier for front-end development teams to build highly custom native UIs, but these aren’t necessary for every project. Sometimes, standard visualizations are enough and speed is key.</p><p>A new generation of collaborative data tools, including <a href="https://hex.tech/">Hex</a>, <a href="http://observablehq.com/">Observable</a>, and <a href="http://streamlit.io/">Streamlit</a>, make it possible for data analysts to quickly select the appropriate chart for a dataset and share reports both throughout a company and to end customers.</p><p>Organizations need the freedom to choose the right tool for each job — whether it’s a custom application built by front-end teams or shareable dashboards built by data teams.</p><h3>Rethinking the data stack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7EngYI3YwV_IFXVs.png" /></figure><p>Thinking about these developments, what are the technical requirements of a modern embedded analytics data stack?</p><h3>Data warehouse-centric architecture</h3><p>As <a href="https://medium.com/snowflake/how-to-build-a-data-app-on-snowflake-db80ac459767">others</a> <a href="https://pchase.substack.com/p/thenewbackend?s=r">have</a> <a href="https://www.youtube.com/watch?v=PEFP5fLx1dY">noticed</a>, the cloud data warehouseis a place not only to store and process data, but also to make it interactive. To actually be a backend for data analytics applications, including embedded analytics, the data warehouse needs to be at the core of your data stack.</p><p>Having data in a single place significantly reduces operational overhead. On one end, ELT is replacing ETL, and on the other, we see a move away from moving data into “serving” databases. Instead, the trend is towards powering applications with data directly from warehouses. This architecture is simpler and less error-prone because it removes additional pipelines and storage layers.</p><p>Warehouses still predominantly work with batch data, but there are a lot of recent exciting developments in supporting real-time data. <a href="https://www.firebolt.io/">Firebolt</a>, <a href="https://clickhouse.com/">Clickhouse</a> and <a href="https://materialize.com/">Materialize</a> are actively innovating in the space.</p><p>Finally, this architecture also opens an opportunity for <a href="https://pchase.substack.com/p/thenewbackend?s=r">bring-your-own-data-warehouse applications</a>. This may be beneficial for both vendors and consumers because it simplifies the security architecture and streamlines new software onboarding.</p><h3>Headless BI in the middle</h3><p><a href="https://cube.dev/blog/headless-bi">We’ve previously described the four essential components of headless BI</a>. To specifically support embedded analytics, a headless BI solution must have these attributes:</p><h3>First-class support for cloud data warehouses</h3><p>A major piece of this is access control integrated with the data warehouse’s security controls, because embedded analytics always require multitenancy. A second piece is advanced caching. This is because the data warehouse is a great candidate for a backend, but itself does not support high-concurrency small queries with the low latency that modern data consumers expect.</p><h3>Data modeling</h3><p>The diversity of new data consumers all should consume the same data: “net sales” in your dashboard should mean the same thing as “net sales” in my mobile CRM. To achieve this consistency, data modeling and metrics definition should be handled once, and this must be up-stack from every application or dashboard.</p><h3>Diverse APIs</h3><p>Different data consumers have different expectations and requirements, so it’s inevitable that a company will end up supporting a whole class of data apps. For all of these applications to share the same metrics, a headless BI layer needs to be accessible via multiple APIs, e.g., SQL, GraphQL, and REST.</p><h3>A hybrid presentation layer</h3><p>To support different data consumers, use cases, and teams, an embedded analytics presentation layer should be diverse.</p><p>When high customization is required and front-end teams are looped in, different charting libraries can be used, ranging from <a href="https://d3js.org/">D3</a> to <a href="https://www.chartjs.org/">Chart.js</a> and <a href="https://www.highcharts.com/">Highcharts</a>. These most likely will be natively integrated with frontend application frameworks like React or <a href="https://angularjs.org/">Angular</a>.</p><p>When requirements are less custom, tools like Observable or <a href="https://plotly.com/dash/">Dash</a> come into the picture. It’s faster and cheaper to build with these tools, and they still can be natively integrated into an app and combined with more custom interfaces.</p><p>Data analysts and engineers can quickly build appealing data interfaces with modern BI tools like <a href="https://superset.apache.org/">Superset</a> and <a href="https://www.metabase.com/">Metabase</a>. These are less customizable, but they don’t require front-end knowledge. This usually enables even faster building and iteration. They too can be combined with other presentation layers within a single application.</p><p>Finally, there is the emerging category of no-code/low-code tools for internal tooling. This includes <a href="https://www.appsmith.com/">Appsmith</a> and <a href="https://retool.com/">Retool</a>. They too can be used to build analytics interfaces.</p><h3>Conclusion</h3><p>We’ve moved past the historical era when embedded analytics was considered a part of a single integrated BI solution. The latest generation of BI vendors already have innovated to run “live” queries directly on top of data warehouses, which allows for cloud data warehouse-centric architectures.</p><p>The next evolutionary step is to decapitate BIs and give organizations freedom to switch heads (frontends) or use many of them at the same time.</p><p>This architecture will be enabled by several products, including Cube. As the category matures, and more enterprises adopt this architecture, we’ll see more exciting developments. Buckle up.</p><p><em>Cube is an API‑first business intelligence platform for data engineers and application developers to make data accessible and consistent across every application. </em><a href="https://cube.dev/cloud"><em>Get started with Cube for free today</em></a><em>, or </em><a href="https://cube.dev/contact"><em>get in touch</em></a><em> to discuss your next embedded analytics project!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b006c8ff6428" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/the-modern-data-stack-for-embedded-analytics-b006c8ff6428">The Modern Data Stack for Embedded Analytics</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time Series Data Analytics with QuestDB and Cube]]></title>
            <link>https://medium.com/cube-dev/time-series-data-analytics-with-questdb-and-cube-84a9fa9ea6c4?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/84a9fa9ea6c4</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[headless-bi]]></category>
            <category><![CDATA[data-modeling]]></category>
            <category><![CDATA[time-series-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Tamar Barlev]]></dc:creator>
            <pubDate>Tue, 26 Apr 2022 15:56:15 GMT</pubDate>
            <atom:updated>2022-04-26T15:56:15.472Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xjt1qIOvTmKj13t_.png" /></figure><p>Time series data has now become a critical part of the data applications landscape. And at Cube, we’re super excited about how QuestDB changes the way companies work with it. In this blog, we’ll take a look at how QuestDB and Cube work together to provide a time series data pipeline that is fast, consistent, and reliable.</p><h3>What is QuestDB?</h3><p><a href="https://questdb.io/">QuestDB</a> is a performant open-source database for time series data. Its codebase is optimized for storing and processing large amounts of time-stamped data efficiently through lightning-fast SQL queries.</p><p>QuestDB also allows for integration with a variety of popular open source tools through the PostgreSQL wire protocol, and its use cases range from real-time analytics and monitoring to market/tick data and industrial telemetry.</p><h3>What is Cube?</h3><p><a href="https://cube.dev/">Cube</a> is a headless business intelligence platform that can organize all your data into a structured data model. Defining metrics upstream of your applications — so, for instance, defining the granularity of data observed — enables you to access the same data metrics across various applications, use cases, and teams.</p><p>With Cube’s data modeling capabilities, you can shorten your project timeline from weeks to hours. And, with its API-first approach, Cube you can connect to your streamlined data via an API that best suits your application and infrastructure (whether it be a REST, GraphQL, or SQL API).</p><h3>How QuestDB and Cube Work Together</h3><p>So there you have it — a structured data model built on top of a fast repository of time series data. QuestDB is optimized for slicing and dicing time-stamped data through its <a href="https://questdb.io/docs/concept/sql-extensions/">SQL extensions</a>. Cube also offers multiple ways of <a href="https://cube.dev/docs/caching/using-pre-aggregations">pre-aggregating data</a> effectively building a caching layer on top of your data to speed up performance of slow queries. Together, QuestDB and Cube have your time series data all set up for use downstream.</p><h3>Exploring Crypto Prices with QuestDB and Cube</h3><p>Let’s illustrate how the two app stacks work together. In this example, we’ll show how you can efficiently build an end-to-end crypto price analysis platform with QuestDB and Cube. We will use Cube to expose time series data in QuestDB via multiple APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hlvdx_xHZ5808f4f.png" /></figure><h3>Setting Up QuestDB and Importing Time Series Data</h3><p>First, you should set up a new project directory in your local system e.g. ‘questdb_cube’.</p><p>We’ll begin our demo by using the <a href="https://www.kaggle.com/datasets/sudalairajkumar/cryptocurrencypricehistory">Crypto dataset</a> to show how we can create a time series database in QuestDB, and then organize the data downstream with Cube. Since both applications can be initiated using <a href="https://docs.docker.com/get-docker/">Docker</a>, let’s start up both engines by stringing them together using Docker Compose.</p><p>Then, create a docker-compose.yml file in the project directory with the following contents:</p><pre>version: &quot;2.2&quot;</pre><pre>services:</pre><pre>cube:</pre><pre>environment:</pre><pre>- CUBEJS_DEV_MODE=true</pre><pre>image: &quot;cubejs/cube:latest&quot;</pre><pre>ports:</pre><pre>- &quot;4000:4000&quot;</pre><pre>volumes:</pre><pre>- &quot;.:/cube/conf&quot;</pre><pre>questdb:</pre><pre>container_name: questdb</pre><pre>hostname: questdb</pre><pre>image: &quot;questdb/questdb:latest&quot;</pre><pre>ports:</pre><pre>- &quot;9000:9000&quot;</pre><pre>- &quot;8812:8812&quot;</pre><p>Add an .env file that gives Cube the details for connecting to QuestDB:</p><pre>CUBEJS_DB_HOST=questdb</pre><pre>CUBEJS_DB_PORT=8812</pre><pre>CUBEJS_DB_NAME=qdb</pre><pre>CUBEJS_DB_USER=admin</pre><pre>CUBEJS_DB_PASS=quest</pre><pre>CUBEJS_DB_TYPE=questdb</pre><p>Run the containers using the following command:</p><p>docker-compose up -d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/0*VT9Cc501f8g-XytD.png" /></figure><p>Navigate to <a href="http://localhost:9000/">localhost:9000</a> to open QuestDB’s Web Console, click on the “Upload” icon on the left-hand panel, and import the <a href="https://www.kaggle.com/sudalairajkumar/cryptocurrencypricehistory">csv files of interest</a>. While this example uses the Ethereum dataset, any of the coin datasets will work perfectly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*0mUN3Odi9Jq8_ghd.png" /></figure><p>Note: Cube works best with table names that do not contain any special characters. So, we’re going to rename our table using the following command:</p><pre>RENAME TABLE &#39;coin_Ethereum.csv&#39; TO &#39;ethereum&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2m9aTLDhc2blCvEm.png" /></figure><p>Now, we’re able to query the data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LEb0mbuseb6fL0KP.png" /></figure><h3>Building a Cube Data Model</h3><p>The next step is to organize the time series data from QuestDB in a uniform and accessible manner; we do this by defining a data model.</p><p>The <a href="https://cube.dev/docs/schema/fundamentals/concepts">Cube data model</a> consists of entities we call ‘cubes’ that define metrics by <em>dimensions</em> (qualitative categories) and <em>measures</em> (numerical values). So, with that in mind, let’s continue by creating a cube for our Ethereum data.</p><p>Navigate to localhost:4000/#/schema and click on the Ethereum table we imported into QuestDB:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*bjbqs_DBEpqX-vUU.png" /></figure><p>Clicking on the ‘Generate Schema’ button automatically bootstraps a cube for the data in our local project directory — a folder named ‘schema’. This folder contains a file called ‘Ethereum.js’ that you can open with any text editor.</p><p>By default, the ‘count’ field falls under measures; name, symbol, and date fields are auto-populated as dimensions. Since we’re interested in price columns, let’s add them in (defined as ‘high’ and ‘low’ in the data model as shown below):</p><pre>cube(`Ethereum`, {</pre><pre>sql: `SELECT * FROM ethereum`,</pre><pre>measures: {</pre><pre>count: {</pre><pre>type: `count`,</pre><pre>drillMembers: [name, date]</pre><pre>}</pre><pre>},</pre><pre>dimensions: {</pre><pre>name: {</pre><pre>sql: `${CUBE}.&quot;Name&quot;`,</pre><pre>type: `string`</pre><pre>},</pre><pre>symbol: {</pre><pre>sql: `${CUBE}.&quot;Symbol&quot;`,</pre><pre>type: `string`</pre><pre>},</pre><pre>date: {</pre><pre>sql: `${CUBE}.&quot;Date&quot;`,</pre><pre>type: `time`</pre><pre>},</pre><pre>high: {</pre><pre>type: &#39;number&#39;,</pre><pre>sql: `${CUBE}.&quot;High&quot;`</pre><pre>},</pre><pre>low: {</pre><pre>type: &#39;number&#39;,</pre><pre>sql: `${CUBE}.&quot;Low&quot;`</pre><pre>}</pre><pre>}</pre><pre>});</pre><p>Then, by clicking on the ‘Build’ tab in Cube, we can see the data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fehipFjicTZgjD4R.png" /></figure><p>We can also use Cube’s built-in measure type, ‘avg’ to calculate average high or low prices:</p><pre>measures: {</pre><pre>avgHigh: {</pre><pre>type: &#39;avg&#39;,</pre><pre>sql: `${CUBE}.&quot;High&quot;`</pre><pre>},</pre><pre>avgLow: {</pre><pre>type: &#39;avg&#39;,</pre><pre>sql: `${CUBE}.&quot;Low&quot;`</pre><pre>}</pre><pre>},</pre><p>Next, we can recreate the classic price-over-time graph:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HxtiN_vABnB1lAJo.png" /></figure><p>Additionally, with Cube, you can pre-aggregate data to speed up the queries. Cube will create materialized rollups of specified dimensions and measures internally, and use aggregate awareness logic to route the queries. This logic will use the most optimal pre-aggregation available to serve the query instead of processing the raw dataset. You can define pre-aggregations within your data model as shown below.</p><pre>preAggregations: {</pre><pre>main: {</pre><pre>measures: [avgHigh, avgLow],</pre><pre>timeDimemsion: date,</pre><pre>granularity: `day`</pre><pre>}</pre><pre>}</pre><p>You can learn more about Cube <a href="https://cube.dev/docs/caching/pre-aggregations/getting-started">pre-aggregations in the documentation.</a></p><h3>Consuming Time Series Data via APIs</h3><p>If you’ve followed along so far, your data is now processed and organized neatly into a data model — aka a cube. So, what’s next? Good question. The answer is simply to connect the data to your application.</p><p>The versatility of Cube — given its ‘headlessness’ — enables you to seamlessly connect to any data application you need, whether it’s a dashboard, notebook, or the backend of your application.</p><p>By taking an API-first approach, Cube as a headless BI tool brings about endless ways of using your data downstream of your time series data sources. And, API endpoints ensure that the metrics are available and consistent across different applications, tools, and teams.</p><p>Let’s take a look at the various ways you can connect to the data model you built via its APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/0*n3AbBnToIBExJrTv.png" /></figure><p>There are three API endpoints that you can use to access your data model:</p><ol><li>REST API: If you’re using Cube as the backend for your application, you can connect to it with the <a href="https://cube.dev/docs/rest-api">REST API</a>.</li><li>GraphQL API: If you’re looking to use standard GraphQL queries for embedded analytics or other data apps, you can connect to Cube with the <a href="https://cube.dev/docs/backend/graphql">GraphQL API</a>.</li><li>SQL API: If you’re querying data using standard ANSI SQL format, you can connect to Cube with the <a href="https://cube.dev/docs/backend/sql">SQL API</a>. No need to learn additional syntax — just use SQL to interact with your data. This is especially useful if you are working with BI tools, dashboards, or data science models.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D0vXgfqe80TTjl0n.png" /></figure><h3>Conclusion</h3><p>With QuestDB’s speedy processing of time series data, and Cube’s data modeling capabilities for consistent definitions, we can now efficiently power many use cases with real-time, reliable data. So, think embedded analytics, business intelligence, machine learning — you name it.</p><p>Curious to see QuestDB’s incredibly performant time series database in action? Check out the <a href="https://demo.questdb.io/">QuestDB demo</a>. Eager to join the QuestDB discussion? Join the QuestDB community on <a href="https://github.com/questdb/questdb">GitHub</a> and <a href="https://slack.questdb.io/">Slack</a>.</p><p>Want to see how QuestDB and Cube can power your project together? <a href="https://cube.dev/docs/">See the docs</a> and <a href="https://cube.dev/cloud">create a free Cube Cloud account today</a>. Have questions or feedback? <a href="https://cube.dev/contact">Drop us a line</a>, <a href="https://slack.cube.dev/">join our Slack</a>, or <a href="https://github.com/cube-js/">check us out on GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84a9fa9ea6c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/time-series-data-analytics-with-questdb-and-cube-84a9fa9ea6c4">Time Series Data Analytics with QuestDB and Cube</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cube’s Open Source Data Modeling Language]]></title>
            <link>https://medium.com/cube-dev/cubes-open-source-data-modeling-language-6de3e2c790dc?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/6de3e2c790dc</guid>
            <category><![CDATA[modern-data-stack]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-model]]></category>
            <dc:creator><![CDATA[Artyom Keydunov]]></dc:creator>
            <pubDate>Wed, 20 Apr 2022 15:33:58 GMT</pubDate>
            <atom:updated>2022-04-20T15:33:58.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O1SHnigeEZcME1UnVT_vAQ.png" /></figure><p>Previously, we’ve discussed the recent emergence of headless BI, and reviewed <a href="https://cube.dev/blog/headless-bi">headless BI’s four essential components</a>. Now, let’s take a more in-depth look at one of those layers: data modeling. Here is an introduction to open source data modeling in Cube’s headless BI platform.</p><p>How data is modeled is the first fundamental element of the business intelligence stack, because it organizes and streamlines querying a data source. Additionally, the data model defines the relationships between each data entity, which forms the basis of all analysis of that data.</p><p>Data modeling is a vital component of the BI stack and must be consistent and universally accessible. And so, its logic should be defined only once, and should be defined in code. Furthermore, this code should be governed by version control, to enable safe iteration as an organization grows.</p><h3>A data modeling language for Headless BI</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5m02AaFOJ9TUgZp9.png" /></figure><p>Cube’s entire headless BI platform is open source — and this includes our open source data modeling language. This language is used to describe measures, dimensions, and relationships in a data source. Then, Cube servers use the model written in this language to generate SQL queries against data sources when responding to requests made to our REST, GraphQL, and SQL APIs.</p><p>Unlike <a href="https://www.looker.com/platform/data-modeling/">other data modeling languages</a>, Cube’s data modeling language is not tied to any specific interface, visualization, or user experience. This decoupling makes it possible to use the same model definitions across every application. Each data consumer can have a custom-tailored experience in the data application of their choice while still working with consistent and standardized definitions.</p><h3>The design of Cube’s data modeling language</h3><p>Cube’s data model is a relational graph of the entities that contain measures and dimensions.</p><p>In Cube, entities are called “cubes” — inspired by OLAP cubes. In essence, they are data tables with a semantic meta layer that describes both the cube’s measures and dimensions and its relationships to other cubes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7J9h1StZMSVjN7-W.png" /></figure><p>Cube operates on the foundational primitives of <em>dimensions</em> and <em>measures</em>. Users can define metrics by combining these primitives.</p><p><em>Dimensions</em> are properties of entity objects, e.g., a user’s country or a product’s category.</p><pre>cube(`Products`, {<br>  dimensions: {<br>    category: {<br>      sql: `category`,<br>      type: `string`<br>    }<br>  }<br>});</pre><p><em>Measures</em> are aggregations, typically defined as SQL expressions or algebraic operations over other measures:</p><pre>cube(`Orders`, {<br>  measures: {<br>    totalValue: {<br>      sql: `value`,<br>      type: `sum`<br>    }<br>  }<br>});</pre><p>Finally, cubes are connected to each other and constitute a data graph.</p><pre>cube(`Orders`, {<br>  joins: {<br>    Products: {<br>      relationship: `belongsTo`<br>      sql: `${Orders}.product_id = ${Products}.id`,<br>    }<br>  }<br>});</pre><p>When users construct metrics, the dimensions and measures they query don’t have to belong to the same cube. They can be located in different places on the data graph. Cube will generate appropriate SQL, including taking care of <a href="https://biguru.wordpress.com/2008/05/01/its-all-in-the-universe-handling-chasm-and-fan-traps/">chasm / fan-outs</a>, to join the underlying tables to respond to the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lWAxFr3nHtx8qf1c.png" /></figure><p>Cube’s approach is different from a query-oriented approach in which metrics are defined by a custom query and a bunch of attributes are assigned to that query. That approach essentially results in single cubes, each with a single measure and a subset of dimensions and filters. Because these cubes aren’t connected to one another, we can’t reuse dimensions, filters, joins, access controls, caching configuration, etc.</p><p>If we were to continue answering more questions and building more metrics, we would have to build more queries, with duplicated definitions and different join paths. At best, this would be repetitive; at worst, it would lead to inconsistent definitions and a combinatorial explosion of metrics and dimensions.</p><p>Instead, we’re focused on letting users define relationships and reuse definitions to build maintainable and scalable data models.</p><p>Cube’s data modeling language is based on JavaScript. This may come as a surprise, given that many data modeling frameworks and languages are based on YAML. However, as a markup language, YAML has no runtime and only limited capacity for code organization. This is a big limitation for complex and dynamic data models.</p><p>By running a data model in a JavaScript virtual machine, Cube can mutate the model at runtime both reactively and proactively, which enables dynamic data definitions, caching, and access control rules.</p><p>Cube’s data modeling language also manages caching. Users can define a set of measures and dimensions that are commonly used together, and materialize them as rollup tables. Since the caching rules are defined in code, it’s possible to manage them using best practices including version control, code reviews, and tests in isolated environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ojeVjzlXyyVygSC-.png" /></figure><p>In Cube, data processing and storage are written in Rust, based on the <a href="https://github.com/apache/arrow-datafusion">Datafusion</a> query execution framework, which uses <a href="https://arrow.apache.org/">Apache Arrow</a> as its in-memory format.</p><h3>A data modeling example</h3><p>Let’s take a look at how to use Cube’s data modeling language.</p><p>We’ll model data for an imaginary e-commerce website. Assume the data warehouse has tables like orders and users with information about transactions and who placed them.</p><h3>Orders</h3><ul><li><strong>id</strong> — ID of the order</li><li><strong>user_id — </strong>ID of the user</li><li><strong>value — </strong>Value of the order in USD</li><li><strong>status — </strong>Status of the order, either “processing” or “completed”</li></ul><h3>Users</h3><ul><li><strong>id</strong> — ID of the user</li><li><strong>country — </strong>Country of the user</li></ul><p>We can represent these two tables in Cube’s modeling language as cubes with this configuration:</p><pre>cube(`Orders`, {<br> sql: `SELECT * FROM orders`,<br> measures: {<br>   totalValue: {<br>     sql: `value`,<br>     type: `sum`,<br>     description: &#39;Total value of orders placed on our website.&#39;,<br>   }<br> },<br> dimensions: {<br>   id: {<br>     sql: `id`,<br>     type: `number`,<br>     primaryKey: true<br>   },<br>  <br>   status: {<br>     sql: `status`,<br>     description: &#39;Status of the order&#39;,<br>     type: `string`<br>   },<br>  <br>   time: {<br>     sql: `timestamp`,<br>     type: `time`<br>   }<br> }<br>});</pre><p>Let’s look at the major elements of the model.</p><p>The sql property describes the table of data that will be used in cube, which references the underlying table within the data warehouse. It also can support arbitrary SQL queries in complex cases.</p><p>The cubes include defined <em>measures</em> and <em>dimensions</em>:</p><ul><li><em>Measures:</em> quantitative data, such as the number of units sold, number of unique visits, revenue, and so forth</li><li><em>Dimensions:</em> properties of data entities, such as state, gender, product name, or units of time</li></ul><p>To build data relationships, we define the joins property on one of the cubes:</p><pre>cube(`Users`, {<br>  sql: `select * from users`,<br>  dimensions: {<br>    id: {<br>      sql: `id`,<br>      type: `number`,<br>      primaryKey: true<br>    },</pre><pre>   country: {<br>      sql: `country`,<br>      type: `string`,<br>      description: `User&#39;s country of residence`<br>    }<br>  }<br>});</pre><h3>Querying the data model</h3><p>With the above data model, it’s now possible to query Cube’s APIs to learn total value grouped by country, or a specific company‘s total value from completed orders.</p><p>To find out the total value of orders by country, we’d use the following JSON query:</p><pre>{</pre><pre>  measures: [Orders.totalValue],</pre><pre>  dimensions: [Users.country]</pre><pre>}</pre><p>You also can explore the data model from within a BI tool:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dboEXUpudmaiarMw.png" /></figure><p>These examples are relatively simple, but a data model and queries can get very complex, with many measures, dimensions, and relationships.</p><p>By creating a data model foundation and exposing metrics via many APIs, Cube ensures that data is accessible and consistent for every downstream application.</p><ul><li><em>Want to explore Cube’s data modeling for yourself? </em><a href="https://cube.dev/cloud"><em>Create a free Cube Cloud account now</em></a><em>.</em></li><li><em>Have questions or input? </em><a href="https://cube.dev/contact"><em>Drop us a line</em></a><em>, </em><a href="https://slack.cube.dev/"><em>join our Slack</em></a><em>, or </em><a href="https://github.com/cube-js/"><em>view our headless BI project on GitHub</em></a><em>.</em></li><li><em>Want updates like these in your inbox? </em><a href="https://cube.dev/#email"><em>Subscribe to our newsletter</em></a><em>.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6de3e2c790dc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/cubes-open-source-data-modeling-language-6de3e2c790dc">Cube’s Open Source Data Modeling Language</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Headless BI?]]></title>
            <link>https://medium.com/cube-dev/what-is-headless-bi-f7c8057abd88?source=rss----cfc9f21a543a---4</link>
            <guid isPermaLink="false">https://medium.com/p/f7c8057abd88</guid>
            <category><![CDATA[modern-data-stack]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <dc:creator><![CDATA[Artyom Keydunov]]></dc:creator>
            <pubDate>Thu, 24 Mar 2022 16:30:55 GMT</pubDate>
            <atom:updated>2022-03-25T20:39:20.829Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rnKrGAipaG20Np9QdqBpqg.png" /></figure><p>With the <a href="https://www.theregister.com/2021/11/15/rise_of_the_cloud_data_warehouse/">explosive growth of cloud data warehouses</a>, an entire <a href="https://www.moderndatastack.xyz/">ecosystem of new data tools</a> has emerged — transformation, testing, quality, observability, to name a few. On top of this modern data stack, we’ve seen a proliferation of new applications, including dashboards, <a href="https://645ventures.com/voices/articles/the-commoditization-of-business-intelligence-tools-the-rise-of-embedded-intelligence-and-our-investment-in-cube-dev">embedded analytics</a>, automation tools, and vertical-specific reporting tools. And, this boom in the modern data stack necessitates a new generation of business intelligence: headless BI.</p><p>Why? Because with every addition to the ecosystem lies the challenge of defining metrics consistently, and making them accessible to every application. This challenge has only grown more urgent — as <a href="https://benn.substack.com/p/metrics-layer?s=r">others</a> <a href="https://basecase.vc/blog/headless-bi">have</a> <a href="https://towardsdatascience.com/a-brief-history-of-the-metrics-store-28208ec8f6f1">observed</a>.</p><p>Specifically, the challenge of data consistency poses a problem for users of traditional business intelligence tools — like Tableau, Looker, or Mode. These tools take defining metrics upon themselves and don’t share their definitions with others:</p><blockquote>While these tools enable business users to use their data better, they have one fatal constraint: users can only use the metrics they’ve defined within the four walls of the visualization tool.[<a href="https://basecase.vc/blog/headless-bi">1</a>]</blockquote><p>In response, we’ve begun to see so-called <a href="https://betterprogramming.pub/headless-bi-metric-standardization-in-action-afb2ac7e89b6">“headless” BI</a>. These are platforms that decouple data metrics from the presentation layers that display them — pushing metrics definition up the data stack.</p><p>However, the popularity of the phrase hasn’t been accompanied by a consistent definition of what headless BI even is. There is more to headless BI than just upstack metrics definition.</p><p>For the benefit of data engineers and data consumers alike, we propose a standardized definition of headless business intelligence. And with it, we describe four essential components of a headless BI tool.</p><h3>1. Data Modeling</h3><p>This is the most widely understood aspect of headless BI. Simply, software engineering best practices dictate that metrics and their governance should a) live in code, and b) be deduplicated. Deduplication refers to removing them from each end-user application in which they’re variously and inconsistently defined, and moving them upstack.</p><p>Fundamentally, defining metrics within a data application leads to duplicated effort and duplicated results. These redundancies — and, therefore, inconsistencies — occur because, regardless of its size, no organization only uses one data application.</p><p>Sales teams use a CRM, marketing teams use marketing automation, and executives use dashboards. If each team were to independently count their own definition of “customer” or sum their own interpretation of “annual revenue”, at best these metrics would be defined more times than necessary. What’s more likely is that the definitions wouldn’t match — which is, in every case we can think of, not ideal. This outcome also defeats <a href="https://www.mckinsey.com/business-functions/mckinsey-analytics/our-insights/the-data-driven-enterprise-of-2025">the whole point of collecting data and distributing it</a> to every team.</p><p>When a headless BI tool defines metrics used by every downstream application, companies get uniform insights instead of inconsistent signals. What’s more, headless BI can help organize and simplify once-complex SQL queries by abstracting them away: a metrics layer can generate SQL queries for defined metrics and dimensions, so downstream applications — and their users — don’t have to. This layer also plays an important role in data governance, including lifecycle management, ownership, and change approval.</p><p>Lastly, in addition to its own definitions, a headless BI platform should consume those from further upstream — <a href="https://cube.dev/blog/dbt-metrics-meet-cube/">e.g., those from transformation tools like dbt.</a></p><h3>2. Access Control</h3><p>Since a headless BI tool is the first layer downstream of one’s data sources, it must also manage and audit access to that data. These controls can’t be decoupled from the data model, and, therefore, should be defined within it.</p><p>Why?</p><p>First, this need also stems from a goal of deduplication. As matters of both good architecture and security best practices, the rules of who can access what should be defined and enforced once, not redundantly — and possibly inconsistently — by downstream tools.</p><p>Second, by instrumenting access control within the data model, you are able to use dynamic metrics definitions. That is, metrics definitions that vary based on the context in which they’re requested. Contextually-informed metrics are particularly useful in a multi-tenant model in which (e.g.) each of your customers ought to access a defined measure, “sales”, that reflects their revenue. Each data consumer gains access only to the subset of metrics to which they’re entitled — without manually redefining “sales” for each.</p><p>Implementing access control within a headless BI tool enables making aggregate metrics widely accessible. Additionally, doing so also protects specific sensitive data (e.g., personally identifiable information.) With the precise ability to control access, you can limit it only to an authorized subset of individuals or applications.</p><p>The above two layers constitute what could be considered a “metrics store” or a “modeling layer.” But we’ll continue with our assertion and say: they are not sufficient to make up a headless BI solution.</p><p>To constitute headless BI, you also need to make data readily accessible to data consumers, and for that you need…</p><h3>3. Caching</h3><p>A headless BI tool is the correct place in which to situate a data caching layer. At first, it may seem counterintuitive to locate a caching layer up-stack of data applications. However, the guiding principles here are, once again, consistency and deduplication.</p><p>For starters, a centrally located caching layer ensures consistent data freshness across tools, using one centrally defined schedule of cache invalidation and warming. Every tool will present the same values at the same time.</p><p>Additionally, if a headless BI tool has been tasked with accessing data from a data store and organizing it into definitions, then it is optimally positioned to manage queues of requests from multiple applications and data consumers.</p><p>Without this mediation, multiple applications may make the same requests. Redundant requests both incur needless bandwidth costs and degrade the performance of other concurrent queries.</p><p>Headless BI can provide several levels of caching. First, a query-level cache can store the results of the query to ensure that identical queries from a tool, or multiple tools, do not increase the load on the underlying data warehouse.</p><p>Additionally, a second layer can implement aggregate awareness: logic to find the smallest, most efficient table to serve the query. Aggregate tables can be either created externally or within the headless BI tool, and can significantly speed up queries and solve the cold cache problem when maintained in the background.</p><p>The prior era of multi-second dashboard loads is over, and it’s not coming back. By managing caching, a headless BI tool ensures sub-second responses in every downstream application, regardless of the number of requests or the volume of data in the underlying data store.</p><h3>4. APIs</h3><p>Finally, we get to the essential nature of headless BI’s “headlessness.” A headless BI tool must make its data accessible to every “head” application, be it data visualization, dashboarding, embedded analytics, or automation. This means that a headless BI tool must make its data available via various APIs.</p><p>The most obvious candidate here is a SQL endpoint. This enables data consumers to keep using dashboard tools, notebooks, and legacy applications, such as Tableau, that they formerly would have directly connected to a data warehouse.</p><p>The next additions are REST and GraphQL. These ensure that the same metrics that reach dashboards are also available to embedded analytics features, end-user-facing applications, and other innovative uses of your data.</p><p>By exposing APIs to connect discrete applications, a headless BI tool makes it possible to build new automations. Some examples include a workflow that alerts a sales team to contact a customer based on changes in her account usage, or an upstream data source for applications such as reverse ETL.</p><p>“Business intelligence” no longer solely consists of reacting to data in a dashboard; now, an intelligent business actually has actionable data — and acts on it.</p><h3>Headless BI should be open source</h3><p>We’ve just laid out the essential components of a headless BI system. In theory, this could all be furnished by a vendor in a vertically-integrated closed system. However, a headless BI system is truly valuable when it integrates into any data stack, made up of pieces from any number of vendors.</p><p>As a practical matter, this is only possible when multiple companies collaborate: each vendor can contribute connectors and optimizations to improve the compatibility of a headless BI tool with their tools.</p><p>Furthermore, headless BI is so important, and its benefits to the community are so great, that this technology must be made available to everyone. Its stewardship should be guided by community input and community values.</p><p>We’re proud of the community that has grown around Cube in the <a href="https://github.com/cube-js/cube.js/releases/tag/v0.3.5-alpha.0">three years since we open-sourced our headless BI platform</a>. Over 200 contributors have enriched our tool on <a href="https://github.com/cube-js/cube.js">our GitHub repo</a>, and over 5000 users have joined our community Slack to trade tips and share feedback.</p><h3>Headless BI: WIP</h3><p>What next? There are many optimizations to add, tools with which to integrate, and powerful features to build. Along the way, we’re <a href="https://github.com/cube-js/cube.js/issues/3906">soliciting and building connectors</a> to tools like legacy BI applications and gathering feedback in <a href="https://slack.cube.dev/">our Slack</a>. Our <a href="https://twitter.com/messages/compose?recipient_id=179985200">Twitter DMs</a> are open and <a href="http://cube.dev/community-call">our community meets</a> every month. And, with this momentum, <a href="http://cube.dev/careers/">we’re hiring</a> more bright minds to help build Cube full-time.</p><p>Together, we’ll bring data to life and power the next generation of consistent and powerful data applications.</p><p>Won’t you join us?</p><p>If you’re interested in learning more about how <a href="http://cube.dev/">Cube</a> is changing the landscape of business intelligence, check us out <a href="https://cube.dev/cloud/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7c8057abd88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-dev/what-is-headless-bi-f7c8057abd88">What is Headless BI?</a> was originally published in <a href="https://medium.com/cube-dev">Cube Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>