Zing Data Documentation – Docs https://docs.getzingdata.com/docs/ Recent content in Docs on Zing Data Documentation Hugo -- gohugo.io en Docs: Lookup Tables for RLS https://docs.getzingdata.com/docs/row-level-security/lookup-tables/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/row-level-security/lookup-tables/ <p>A lookup table allows you to use more user attributes for row level security filtering. For example, without a lookup table you can only use an email field for row level security. By defining a lookup table with user information, you will be able to use any attribute in the table as the RLS filter.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/_P_X-pc5Zl8" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> <p> </p> <p>A lookup table can be defined for each of your datasources. <strong>The email field is a must have on your lookup table.</strong></p> <p>Let&rsquo;s look at an example lookup table.</p> <table> <thead> <tr> <th>user_id</th> <th>name</th> <th>email</th> <th>role</th> <th>region</th> </tr> </thead> <tbody> <tr> <td>101</td> <td>User1</td> <td><a href="mailto:user1@acme.com">user1@acme.com</a></td> <td>engineer</td> <td>east</td> </tr> <tr> <td>102</td> <td>User2</td> <td><a href="mailto:user2@acme.com">user2@acme.com</a></td> <td>sales</td> <td>west</td> </tr> <tr> <td>103</td> <td>User3</td> <td><a href="mailto:user3@acme.com">user3@acme.com</a></td> <td>desginer</td> <td>central</td> </tr> <tr> <td>104</td> <td>User4</td> <td><a href="mailto:user4@acme.com">user4@acme.com</a></td> <td>engineer</td> <td>east</td> </tr> <tr> <td>105</td> <td>User5</td> <td><a href="mailto:user5@acme.com">user5@acme.com</a></td> <td>engineer</td> <td>west</td> </tr> </tbody> </table> <h2 id="specifying-a-lookup-table-for-a-datasource">Specifying a lookup table for a datasource</h2> <ol> <li>Visit the <a href="https://console.getzingdata.com/datasource">datasource page</a> on the Zing console.</li> <li>Click on the <strong>Settings</strong> button on your datasource.</li> <li>Turn on the toggle for Row Level Security.</li> <li>Select the table you want to set as the lookup table for the datasource and the email field in that table. <img src="https://docs.getzingdata.com/images/row-level-security.webp" alt=""></li> <li>Now you can specify any filter on your charts/tables as mentioned <a href="https://docs.getzingdata.com/docs/row-level-security/">here</a> using the attributes in your lookup table. For example, if you want to apply the RLS filter on the user&rsquo;s ID, the filter on the WHERE condition should be <strong>{{zing.user.user_id}}</strong>. Filtering by the region would be possible by specifying the filter as <strong>{{zing.user.region}}</strong>.</li> </ol> Docs: Setup and Preparation https://docs.getzingdata.com/docs/embedded-analytics/setup-and-preparation/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/embedded-analytics/setup-and-preparation/ <ol> <li>Visit the <a href="https://console.getzingdata.com">Zing console</a> and click on <strong>Organizations</strong>. <img src="../embed-nav.png" alt=""></li> <li>The organization that has embeds enabled will have a &ldquo;Pro&rdquo; badge. <img src="../embed-org.png" alt=""></li> <li>Click on <strong>Settings</strong> for the organization and click on the <strong>Embeds</strong> tab.</li> <li>Generate an API key for your organization (E.g.: <code>7bf7aa96-dee0-4750-b97c-3bd13864de81</code>). <ul> <li>This API key will be used to authorize the organization for embedded charts/tables.</li> <li>Along with the API key, an embed secret will be generated for you which will be used to create an immutable signed URL for your embeds.</li> <li><em>Make sure you don&rsquo;t expose the API Key or the Embed Secret publicly as this will be used to authenticate your organization.</em></li> </ul> </li> <li>Admins of the organization will have the ability to create multiple API keys per organization and activate/deactivate an API key anytime.</li> </ol> <h3 id="generate-embed-ids-for-questions">Generate Embed IDs for questions</h3> <ol> <li><a href="https://docs.getzingdata.com/docs/asking-questions/">Create your questions</a> on the <a href="https://console.getzingdata.com/web">Zing Web App</a> or Mobile App.</li> <li>To generate an embed ID for a question, click on the three dot menu for a saved question and click on <strong>Embed Options</strong>.</li> <li>All questions embed IDs were generated for, will appear under the Embeds tab on the organization page of the Zing console. <img src="../embed-tab.png" alt=""></li> <li>Embed IDs can be enabled and disabled when required. <img src="../embed-ids.png" alt=""></li> </ol> <h3 id="generate-embed-ids-for-dashboards">Generate Embed IDs for dashboards</h3> <ol> <li><a href="https://docs.getzingdata.com/docs/dashboards/">Create your dashboard</a> on the <a href="https://console.getzingdata.com/web">Zing Web App</a> or Mobile App.</li> <li>To generate an embed ID for a dashboard, click on the three dot menu for a saved dashboard and click on <strong>Embed Options</strong>.</li> <li>All dashboards embed IDs were generated for, will appear under the Embeds tab on the organization page of the Zing console. <img src="../embed-dash-ids.png" alt=""></li> <li>Embed IDs can be enabled and disabled when required.</li> </ol> Docs: Centralized RLS Setup https://docs.getzingdata.com/docs/row-level-security/centralized-rls-setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/row-level-security/centralized-rls-setup/ <p>Centralized Row Level Security in Zing lets you control what data each user can see based on that user’s attributes and conditions you specify.</p> <p><strong>Once set up, centralized RLS applies for</strong> <em><strong>all user roles</strong></em> <strong>(viewer, member, editor, admin)</strong><em><strong>,</strong></em> <strong>and</strong> <em><strong>all query modes</strong></em> <strong>(natural language querying, visual querying, SQL IDE).</strong></p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/eVgaqo9O6go" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> <p>Centralized RLS differs from simply specifying a user-specific filter when you&rsquo;re creating question, because it applies the row level filtering as a pre-step, before any query is run.</p> <p><img src="../rls_table_1.png" alt=""></p> <p>With centralized RLS, the RLS conditions are always enforced and a user cannot remove the RLS filters like they could if you used lookup tables and user-aware filtering alone. This means even users with an editor role, or those who copy a question and edit it wouldn&rsquo;t be able to remove the centralized RLS.</p> <p>When a user is logged in to Zing (or is authenticated in embedded mode), they have an identifier. That identifier and other attributes of that identifier (as specified in a lookup table) are used dynamically at runtime to compare against the conditions you specify.</p> <h5 id="note">Note:</h5> <ul> <li>RLS conditions are applied at a table/view level by <strong>specifying a SQL condition which would evaluate to TRUE for the rows a user will be able to see</strong>.</li> <li>Tables/views without any condition specified will have all rows visible to all users.</li> <li>Only administrators of an organization can set up or modify centralized RLS.</li> <li>Centralized Row Level Security conditions apply to <em><strong>all new and existing questions and dashboards</strong>.</em></li> <li>You should verify with a sample question that your RLS conditions are set correctly and working as you expect.</li> <li>RLS is compatible with all Zing functionality.</li> </ul> <p> </p> <h2 id="setting-up-centralized-row-level-security">Setting Up Centralized Row Level Security</h2> <ol> <li> <p>Create a data source then click &lsquo;Settings&rsquo; and &lsquo;Row Level Security&rsquo;</p> </li> <li> <p>Turn on RLS and define a lookup table for user attributes. You&rsquo;ll have one column indicating the user&rsquo;s identifier (email), and other columns which will be used as dynamic lookups for that user&rsquo;s attributes.</p> <p><img src="../rls_tab.png" alt=""></p> <p><br>Note: this is a <em>live check</em> so updating this table will update the user&rsquo;s attributes and resulting rows shown on queries that rely on RLS.</p> </li> <li> <p>Click on a table or view from the list on the left, and then specify the condition which should evaluate to TRUE if a user is to be shown that row, and FALSE if they shouldn&rsquo;t see that row based on the condition you specify. For instance:<br><br> <img src="../rls_conditions.png" alt=""></p> </li> </ol> <p>4. Click &lsquo;save&rsquo; and your RLS conditions are immediately applied.</p> <p>5. Check that the RLS conditions you&rsquo;ve set are working as you expect and modify them if needed.<br><br><em><br><br><br></em></p> Docs: Integration https://docs.getzingdata.com/docs/embedded-analytics/integration/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/embedded-analytics/integration/ <p>In order to embed a chart, your application&rsquo;s source code needs to be updated based on the below steps.</p> <h2 id="server-side-backend">Server-side (backend)</h2> <h3 id="step-1---create-a-secure-session-with-zing">Step 1 - Create a Secure Session with Zing</h3> <p>A secure session needs to be created with Zing in order to start embedding charts/dashboards. This should be done by calling the API:</p> <pre tabindex="0"><code>POST https://console.getzingdata.com/api/v1/embed-sessions </code></pre><p>An example of how to create a Zing session using NodeJS:</p> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">url</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#4e9a06">&#39;https://console.getzingdata.com/api/v1/embed-sessions&#39;</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">payload</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">userData</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">email</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">loggedInUserEmail</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">};</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">options</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">headers</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#39;Content-Type&#39;</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;application/json&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#39;x-zingdata-api&#39;</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">ZING_API_KEY</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">};</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">response</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">await</span> <span style="color:#000">axios</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">post</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">url</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">payload</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">options</span><span style="color:#000;font-weight:bold">);</span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">oneTimeSessionToken</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">response</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">data</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">token</span><span style="color:#000;font-weight:bold">;</span> </span></span></code></pre></div><p>This token created by the backend will need to be passed to the frontend for your end user to be able to view an embedded chart. You can expose an API from your backend for the frontend to fetch this token for each chart that you embed. A session token needs to be created for every chart you want to embed.</p> <h3 id="step-2---generate-signed-embed-url">Step 2 - Generate Signed Embed URL</h3> <p>You can create signed one-time-use URLs for graphs/dashboards, which are more secure because they can’t be reused and are a way to ensure your server has validated each request. In order to generate the signed URL, add a new API endpoint in your server code.</p> <p>A NodeJS example for this API endpoint is given below.</p> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">crypto</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">require</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#39;crypto&#39;</span><span style="color:#000;font-weight:bold">);</span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">uuid</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">require</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#39;uuid&#39;</span><span style="color:#000;font-weight:bold">);</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#000">app</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">post</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#39;/api/generate-url&#39;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000;font-weight:bold">(</span><span style="color:#000">req</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">res</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">=&gt;</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000;font-weight:bold">{</span> <span style="color:#000">embedId</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">where</span> <span style="color:#000;font-weight:bold">}</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">req</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">body</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">baseUrl</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#4e9a06">&#39;https://console.getzingdata.com/embeds&#39;</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">let</span> <span style="color:#000">parameters</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#4e9a06">`?nonce=</span><span style="color:#4e9a06">${</span><span style="color:#000">uuid</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">v4</span><span style="color:#000;font-weight:bold">()</span><span style="color:#4e9a06">}</span><span style="color:#4e9a06">`</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> <span style="color:#000">parameters</span> <span style="color:#ce5c00;font-weight:bold">+=</span> <span style="color:#4e9a06">`&amp;timestamp=</span><span style="color:#4e9a06">${</span><span style="color:#204a87">Math</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">floor</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">new</span> <span style="color:#204a87">Date</span><span style="color:#000;font-weight:bold">().</span><span style="color:#000">getTime</span><span style="color:#000;font-weight:bold">()</span> <span style="color:#ce5c00;font-weight:bold">/</span> <span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#000;font-weight:bold">)</span><span style="color:#4e9a06">}</span><span style="color:#4e9a06">`</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> <span style="color:#000">parameters</span> <span style="color:#ce5c00;font-weight:bold">+=</span> <span style="color:#4e9a06">`&amp;embedId=</span><span style="color:#4e9a06">${</span><span style="color:#000">embedId</span><span style="color:#4e9a06">}</span><span style="color:#4e9a06">`</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">if</span> <span style="color:#000;font-weight:bold">(</span><span style="color:#000">where</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">parameters</span> <span style="color:#ce5c00;font-weight:bold">+=</span> <span style="color:#4e9a06">`&amp;where=</span><span style="color:#4e9a06">${</span><span style="color:#000">where</span><span style="color:#4e9a06">}</span><span style="color:#4e9a06">`</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">urlWithParameters</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">baseUrl</span> <span style="color:#ce5c00;font-weight:bold">+</span> <span style="color:#000">parameters</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">signature</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">crypto</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">.</span><span style="color:#000">createHmac</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#39;sha256&#39;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">Buffer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">from</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">process</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">env</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">ZING_EMBED_SECRET</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#39;utf8&#39;</span><span style="color:#000;font-weight:bold">))</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">.</span><span style="color:#000">update</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">Buffer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">from</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">urlWithParameters</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#39;utf8&#39;</span><span style="color:#000;font-weight:bold">))</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">.</span><span style="color:#000">digest</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#39;hex&#39;</span><span style="color:#000;font-weight:bold">);</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">finalUrl</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">${</span><span style="color:#000">urlWithParameters</span><span style="color:#4e9a06">}</span><span style="color:#4e9a06">&amp;signature=</span><span style="color:#4e9a06">${</span><span style="color:#000">signature</span><span style="color:#4e9a06">}</span><span style="color:#4e9a06">`</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#000">res</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">json</span><span style="color:#000;font-weight:bold">({</span> <span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">finalUrl</span> <span style="color:#000;font-weight:bold">});</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">});</span> </span></span></code></pre></div><p>In here, the <strong>ZING_EMBED_SECRET</strong> is read from an environment variable.</p> <p>Now let&rsquo;s move on to the frontend updates.</p> <h2 id="client-side-frontend">Client-side (frontend)</h2> <ol> <li> <p>Contact the Zing team and obtain the Zing key (REACT_APP_ZING_KEY).</p> </li> <li> <p>Install the <a href="https://www.npmjs.com/package/@zingdata/zingdata-react">Zing SDK</a> on your application&rsquo;s front-end.</p> </li> </ol> <p>From NPM:</p> <pre><code>npm install --save @zingdata/zingdata-react </code></pre> <ol start="3"> <li>Import the Zing CSS file in your main HTML or CSS file.</li> </ol> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-css" data-lang="css"><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">import</span> <span style="color:#4e9a06">&#34;@zingdata/zingdata-react/dist/zing.css&#34;</span><span style="color:#ce5c00;font-weight:bold">;</span> </span></span></code></pre></div><ol start="4"> <li> <p>Call the API endpoint that you defined in your backend to fetch the Zing session <strong>token</strong> for each chart (E.g: <strong>zingToken</strong>).</p> </li> <li> <p>Call the API endpoint that you defined in your backend to generate the <strong>signed embed URL</strong> for each chart.</p> </li> </ol> <ul> <li>Payload should contain the <strong>embedId</strong> of the question and the <strong>where</strong> property (If dynamic filtering is required - <em>where</em> property is optional. More information about the <em>where</em> condition is given at the end of this guide.)</li> <li>This should be done for each embedded chart/dashboard in your application, as each chart/dashboard will have an immutable URL.</li> </ul> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-react" data-lang="react"><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">fetchUrl</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">async</span> <span style="color:#000;font-weight:bold">(</span><span style="color:#000">embedId</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">where</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">=&gt;</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">result</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">await</span> <span style="color:#000">axios</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">post</span><span style="color:#000;font-weight:bold">(</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#39;/api/generate-url&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">embedId</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">embedId</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">where</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">where</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">headers</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#39;Content-Type&#39;</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;application/json&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">);</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">return</span> <span style="color:#000">result</span><span style="color:#ce5c00;font-weight:bold">?</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">data</span><span style="color:#ce5c00;font-weight:bold">?</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">url</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">};</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#8f5902;font-style:italic">// Call the above function to fetch the generated URL </span></span></span><span style="display:flex;"><span><span style="color:#8f5902;font-style:italic"></span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">signedUrl</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">await</span> <span style="color:#000">fetchUrl</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">embedId</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">where</span><span style="color:#000;font-weight:bold">);</span> </span></span></code></pre></div><ol start="6"> <li>Embed the chart using the SDK</li> </ol> <p>Include the below code on the page where the chart/dashboard needs to be rendered.</p> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-react" data-lang="react"><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">import</span> <span style="color:#000;font-weight:bold">{</span> <span style="color:#000">ZingDataEmbed</span> <span style="color:#000;font-weight:bold">}</span> <span style="color:#000">from</span> <span style="color:#4e9a06">&#39;@zingdata/zingdata-react&#39;</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">&lt;</span><span style="color:#204a87;font-weight:bold">ZingDataEmbed</span> </span></span><span style="display:flex;"><span> <span style="color:#c4a000">embedUrl</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000;font-weight:bold">{</span><span style="color:#000">signedUrl</span><span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#c4a000">apiKey</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000;font-weight:bold">{</span><span style="color:#000">process</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">env</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">REACT_APP_ZING_API_KEY</span><span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#c4a000">token</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000;font-weight:bold">{</span><span style="color:#000">zingToken</span><span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#c4a000">zingKey</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000;font-weight:bold">{</span><span style="color:#000">process</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">env</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">REACT_APP_ZING_KEY</span><span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#c4a000">className</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;mt-5&#34;</span> <span style="color:#a40000">//</span> <span style="color:#c4a000">optional</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">/&gt;</span> </span></span></code></pre></div><ul> <li>An optional <strong>className</strong> parameter can be passed to <strong>ZingDataEmbed</strong> if you need any custom styles to be applied to the container.</li> <li><em>embedUrl</em>, <em>token</em> and <em>apiKey</em> properties are required.</li> </ul> <ol start="7"> <li>A question can be filtered from your application&rsquo;s source code by adding a chart property: <em>where</em>. For instance, you could filter based on <em>city</em>, <em>company</em>, or any other field in your datasource to customize the chart to a specific context. The example below shows filtering based on the city.</li> </ol> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#000">where</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000;font-weight:bold">{</span><span style="color:#000">JSON</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">stringify</span><span style="color:#000;font-weight:bold">({</span> </span></span><span style="display:flex;"><span> <span style="color:#000">queryConstruct</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">where</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">column</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#39;Prospect City&#39;</span><span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#000">condition</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;!=&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">values</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;Boston&#39;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">})}</span> </span></span></code></pre></div><p>This condition needs to be passed to the <em>fetchUrl</em> function in step 3 to be included in the signed URL.</p> <p>Multiple conditions can be added to the <em>where</em> property as follows.</p> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#000">where</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000;font-weight:bold">{</span><span style="color:#000">JSON</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">stringify</span><span style="color:#000;font-weight:bold">({</span> </span></span><span style="display:flex;"><span> <span style="color:#000">queryConstruct</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">where</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">column</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#39;Prospect City&#39;</span><span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#000">condition</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;!=&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">values</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;Boston&#39;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">column</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#39;Year&#39;</span><span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#000">condition</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;=&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">values</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;2023&#39;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">})}</span> </span></span></code></pre></div><p>The <em>where</em> property can have the following conditions.</p> <ul> <li>Equals (<strong>=</strong>) only returns results which match the value you input (e.g. “City = ‘New York’” will return results only where the city field for that row equals New York).</li> <li>Does Not Equal (<strong>!=</strong>) returns results which do not match the value you input (e.g. “City != ‘New York’” would return all cities except New York).</li> <li>Greater than (<strong>&gt;</strong>) returns results which are greater than the value you input.</li> <li>Greater than or equal (<strong>&gt;=</strong>) returns results which are greater than or equal to the value you input.</li> <li>Less than (<strong>&lt;</strong>) returns results which are less than the value you input.</li> <li>Less than or equal (<strong>&lt;=</strong>) returns results which are less than or equal to the value you input.</li> <li>Between (<strong>between</strong>) returns results which are between the two values you specify. For date fields this will be two dates.</li> <li>Includes (<strong>includes</strong>) returns results which include part or all of the value you input. For instance “City includes ‘San’” would return “San Francisco” and “San Diego” if those values are present in the data.</li> <li>Excludes (<strong>excludes</strong>) returns results which do not include any of the value you input. For instance “City excludes ‘San’” would return all cities which do not contain “San” in their name so “New York” and “Boston” would be part of the result set, but “San Diego” and “San Francisco” would not.</li> </ul> <p><em><strong>where</strong> conditions should not be defined for user specific data.</em></p> <ol start="8"> <li>Multiple charts/tables/dashboards can be embedded by using an embed ID for each chart/table/dashboard.</li> </ol> Docs: Row Level Security for Embedded Charts https://docs.getzingdata.com/docs/embedded-analytics/embedded-row-level-security/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/embedded-analytics/embedded-row-level-security/ <p>Row Level Security allows you to control access to data in a database by row, so that a logged in user can only view the data they are authorized for. You will be able to control “Who sees what in the chart?” by including a RLS filter to the question.</p> <h2 id="steps">Steps</h2> <ol> <li>Ask a question via the <a href="https://console.getzingdata.com/web">Zing Web App</a> or Mobile App with a Row Level Security filter. Refer this <a href="https://docs.getzingdata.com/docs/row-level-security/">guide</a> for more information on how to create a question with an RLS filter.</li> <li>Embed the chart by following the steps under the <a href="https://docs.getzingdata.com/docs/embedded-analytics/setup-and-preparation/">Setup and Preparation</a> and the <a href="https://docs.getzingdata.com/docs/embedded-analytics/integration/">Integration</a> sections.</li> <li>Send the <strong>logged in user&rsquo;s data</strong> when creating a session with Zing via your backend code. The information sent in the payload will be used for RLS filtering.</li> </ol> <p>An example of how to create a session token in NodeJS is shown below.</p> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">url</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#4e9a06">&#39;https://console.getzingdata.com/api/v1/embed-sessions&#39;</span><span style="color:#000;font-weight:bold">;</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">payload</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">userData</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">email</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">loggedInUserEmail</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">role</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">loggedInUserRole</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">username</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">loggedInUserUsername</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000">name</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">loggedInUserName</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">};</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">options</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#000">headers</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#39;Content-Type&#39;</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#4e9a06">&#39;application/json&#39;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#39;x-zingdata-api&#39;</span><span style="color:#ce5c00;font-weight:bold">:</span> <span style="color:#000">ZING_API_KEY</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">};</span> </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">response</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">await</span> <span style="color:#000">axios</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">post</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">url</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">payload</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">options</span><span style="color:#000;font-weight:bold">);</span> </span></span><span style="display:flex;"><span><span style="color:#204a87;font-weight:bold">const</span> <span style="color:#000">oneTimeSessionToken</span> <span style="color:#ce5c00;font-weight:bold">=</span> <span style="color:#000">response</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">data</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">token</span><span style="color:#000;font-weight:bold">;</span> </span></span></code></pre></div><p>How to use this one-time token is explained in the <a href="https://docs.getzingdata.com/docs/embedded-analytics/integration/">Integration</a> steps.</p> <p>That&rsquo;s it. 🎉</p> <p>The resulting chart for a query with RLS filtering will have different results based on the logged in user in your application. By excluding certain data from the dataset based on the logged in user would reduce access of data by users who are unauthorized to view them.</p> Docs: PostgreSQL https://docs.getzingdata.com/docs/setting-up-a-data-source/postgresql_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/postgresql_setup/ <p>PostgreSQL is one of the most widely used databases in the world, and its free! Everybody from developers writing their first line of code, to data scientists, to major corporations use PostgresSQL to store and query data.</p> <p>You can connect Zing to your Postgres database from either the <a href="https://console.getzingdata.com/">Zing web console</a>, the Zing web app, the <a href="https://apps.apple.com/us/app/zing-business-intelligence/id1563294091">iOS</a> app, or <a href="https://play.google.com/store/apps/details?id=com.getzingdata.android">Android</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li><em>Hostname</em> which is the URL or IP address of your database</li> <li><em>Port</em> which is the port that your database is live on &ndash; typically 5432 by default for Postgres, but your port may differ</li> <li><em>Database Name</em> which is the name on your hostname IP / URL you database is referenced by</li> <li><em>Username</em> which is&hellip;your username. Best practice is to create a <a href="https://getzingdata.com/blog/setting_up_read_only/">read only user</a></li> <li><em>Password</em> which is&hellip;your password. Once you enter this, Zing will automatically encrypt this.</li> </ul> <h3 id="web-console">Web Console</h3> <p>Add a PostgreSQL database from the web console:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;data sources&rsquo; tab</p> <p><img src="../datasources_screenshot.png" alt=""></p> </li> <li> <p>Enter your PostgreSQL credentials, as outlined above. If your database requires SSL to be enabled, turn on &lsquo;Require SSL&rsquo; (not all Postgres configurations require this).</p> <p><img src="../db_setup_screenshot.png" alt=""></p> <p><img src="https://docs.getzingdata.com/images/ssl.gif" alt=""></p> </li> <li> <p>If your Postgres database is behind a firewall, you&rsquo;ll need to configure your firewall to allow connections from Zing&rsquo;s IP address: <strong><em>34.75.82.6</em></strong></p> </li> <li> <p>Tap &lsquo;Save&rsquo;</p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> </li> </ol> <h3 id="ssh-tunneling">SSH Tunneling</h3> <p>Zing Data supports connecting to your postgres database via an SSH tunnel (sometimes referred to as SSH port forwarding). In an <a href="https://www.postgresql.org/docs/current/ssh-tunnels.html">SSH tunnel</a>, the entire network connection between your postgres database and the Zing Data platform is encrypted. This provides adequate security, even for databases that do not have SSL. In some cases, and for some databases, an SSH tunnel <a href="https://www.percona.com/blog/2013/10/10/mysql-ssl-performance-overhead/">can provide better performance</a> than connecting over SSL.</p> <p><img src="../sshtunnel-postgres.png" alt=""></p> <p>When seting up an SSH tunnel, you will need the following</p> <ul> <li> <p>SSH username</p> <p>This is the username of the ssh tunnel.</p> </li> <li> <p>SSH private key</p> <p>Enter the SSH private key in RSA pem format in the text area. Make sure to not modify any of the newlines.</p> </li> <li> <p>SSH password</p> <p>This is usually not required, as an SSH tunnel can be set up without one.</p> </li> <li> <p>SSH port</p> <p>If no port is specified, Zing Data will attempt to initiate the tunnel connection over port <em>22</em>.</p> </li> </ul> <h3 id="app">App</h3> <p>To add a PostgreSQL database from your phone or the Zing Web App:</p> <ol> <li>Go to the sources tab</li> <li>Tap &lsquo;Add a new data source&rsquo; <img src="../add_datasource_button_screenshot.png" alt=""></li> <li>Enter your database credentials</li> <li>Tap &lsquo;Confirm data source&rsquo;</li> <li>Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here</a></li> </ol> Docs: MySQL https://docs.getzingdata.com/docs/setting-up-a-data-source/mysql_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/mysql_setup/ <p>MySQL is one of the most widely used databases in the world, and its free! Everybody from developers writing their first line of code, to data scientists, to major corporations use MySQL to store and query data.</p> <p>You can connect Zing to your MySQL database from either the <a href="https://console.getzingdata.com/">Zing web console</a>, the Zing web app, the <a href="https://apps.apple.com/us/app/zing-business-intelligence/id1563294091">iOS</a> app, or <a href="https://play.google.com/store/apps/details?id=com.getzingdata.android">Android</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li><em>Hostname</em> which is the URL or IP address of your database</li> <li><em>Port</em> which is the port that your database is live on &ndash; typically 3306 by default for mySQL, but your port may differ</li> <li><em>Database Name</em> which is the name on your hostname IP / URL you database is referenced by</li> <li><em>Username</em> which is&hellip;your username. Best practice is to create a <a href="https://getzingdata.com/blog/setting_up_read_only/">read only user</a></li> <li><em>Password</em> which is&hellip;your password. Once you enter this, Zing will automatically encrypt this.</li> </ul> <h3 id="web-console">Web Console</h3> <p>Add a MySQL database from the web:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;data sources&rsquo; tab</p> <p><img src="../datasources_screenshot.png" alt=""></p> </li> <li> <p>Enter your mySQL credentials, as outlined above. If your database requires SSL to be enabled, turn on &lsquo;Require SSL&rsquo; (not all MySQL configurations require this).</p> <p><img src="../db_setup_screenshot.png" alt=""></p> </li> <li> <p>If your mySQL database is behind a firewall, you&rsquo;ll need to allow connections from Zing&rsquo;s IP address: <strong><em>34.75.82.6</em></strong></p> </li> <li> <p>Tap &lsquo;Save&rsquo;</p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> </li> </ol> <h3 id="app">App</h3> <p>To add a MySQL database from your phone or the Zing web app:</p> <ol> <li>Go to the sources tab</li> <li>Tap &lsquo;Add a new data source&rsquo; <img src="../add_datasource_button_screenshot.png" alt=""></li> <li>Enter your database credentials</li> <li>Tap &lsquo;Confirm data source&rsquo;</li> <li>Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here</a></li> </ol> Docs: Advanced Voice Mode https://docs.getzingdata.com/docs/asking-questions/advanced-voice-mode/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/asking-questions/advanced-voice-mode/ <p>You can simply ask:</p> <ul> <li>What’s our sales growth in the last quarter?</li> <li>Show me the top-performing regions by energy efficiency?</li> <li>What’s the year-over-year revenue change?</li> </ul> <h3 id="tour">Tour</h3> <p><img src="https://docs.getzingdata.com/images/zing-voice-ux-start.webp" alt=""></p> <p><strong>Step 1:</strong> Tap the headphone icon on the home screen [1] and speak your question [2]. Change the data source if needed in the lower left hand corner menu.</p> <p><img src="https://docs.getzingdata.com/images/zing-voice-ux-result.webp" alt=""></p> <p><strong>Step 2:</strong> Your spoken text will appear on the screen [3] and after 2 seconds will automatically submit and start running. Or, you can hit play to run it immediately. Tap “X” to start over at any time.</p> <p><strong>Step 3:</strong> Zing will return with an answer and read it out loud automatically [4]. Stop/Start reading out loud by touching the voice icon (highlighted with a red circle). Add or refine filters effortlessly using the intuitive drag-and-drop interface.</p> <p><strong>Next step:</strong> Touch &ldquo;Run&rdquo;, save your new question and share with co-workers</p> <h3 id="demo-video">Demo Video</h3> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/N28rFcEyfk0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> Docs: Chat https://docs.getzingdata.com/docs/chat/chat/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/chat/chat/ <h5 id="key-capabilities"><strong>Key capabilities</strong></h5> <ul> <li>Ask questions in natural language, including follow-ups</li> <li>Instant chart suggestions</li> <li>Text and chart responses, which are fully visually editable</li> </ul> <h5 id="walkthrough"><strong>Walkthrough</strong></h5> <p><img src="https://docs.getzingdata.com/images/zing-chat-demo-sm.gif" alt=""></p> <h5 id="get-started"><strong>Get started</strong></h5> <ol> <li>From the home screen, tap the search bar and enter your question. If desired change the data source</li> <li>Zing will respond a familiar chat interface with an answer. If the AI is unable to answer your question it might ask you for a clarification based on the available data (e.g. if there are ambiguous fields or you as a question there is insufficient data to answer)</li> <li>If filters have been applied they will appear above the chart or table</li> <li>Select the ••• menu to regenerate the answer, export an image, CSV file, or provide feedback if this was a bad or good response</li> <li>Click <strong>Edit</strong> to manipulate the answer in the Zing chart editor (see (7) for details), click <strong>Save</strong> to keep the answer for adding to a dashboard, appearing on the home screen, and appearing in search</li> <li>Type any follow up questions directly in the Chat interface and Zing will respond with an updated answer that considers the context of the whole chat</li> </ol> <p><img src="https://docs.getzingdata.com/images/zing-chat-tour.webp" alt=""></p> <p>Note: The chat interface is accessed by asking a question in the search bar. Guided analysis questions can be asked via the search bar but currently only as the initial question in a chat.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/GVwkFU1U7UE" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> Docs: Google BigQuery https://docs.getzingdata.com/docs/setting-up-a-data-source/google_bigquery_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/google_bigquery_setup/ <p>You can connect Zing to Google BigQuery as a data source from the <a href="https://console.getzingdata.com/">Zing web console</a>. Zing Data is a trusted <a href="https://cloud.withgoogle.com/partners/detail/?id=zing-data&amp;hl=en-US">Google Cloud Partner</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li><em>Project ID</em> which is the ID for your project in BigQuery</li> <li><em>Service Account JSON</em> which is the file from your Google BigQuery account and allows Zing to authenticate into your BigQuery data source</li> </ul> <p><img src="https://getzingdata.com/images/blog/bigquery_setup.png" alt=""></p> <p>You&rsquo;ll also need to set up appropriate permissions, namely: <code>Big Query Viewer</code> rights and <code>BigQuery Job User</code> rights</p> <h3 id="project-id">Project ID</h3> <p>Just copy and paste your Project ID from your Google BigQuery account. You&rsquo;ll get this from your Google Cloud Console.</p> <h3 id="service-account">Service Account</h3> <p>Your service account is set up by copying your credentials from your <a href="https://cloud.google.com/bigquery/docs/authentication/service-account-file">Google service account</a>.</p> <p>To access your BigQuery credentials required to connect Zing:</p> <ol> <li> <p>Log in to your Google Cloud Console</p> </li> <li> <p>Click &lsquo;IAM &amp; Console&rsquo;</p> </li> <li> <p>Click &lsquo;Service Accounts&rsquo;</p> <p><img src="../google_service_account_01.png" alt=""></p> </li> <li> <p>Add <code>Big Query Viewer</code> rights and <code>BigQuery Job User</code> rights</p> <p><img src="../google_service_account_02.png" alt=""></p> </li> <li> <p>Select <code>Manage Keys</code></p> <p><img src="../google_service_account_03.png" alt=""></p> </li> <li> <p>Select <code>Create Key</code></p> <p><img src="../google_service_account_04.png" alt=""></p> </li> <li> <p>Select <code>JSON</code></p> <p><img src="../google_service_account_05.png" alt=""></p> </li> <li> <p>From here, download the JSON file containing your Service Account information. Copy and paste the file&rsquo;s contents into the Zing Data setup screen in the &lsquo;Service Account&rsquo; box.</p> <p><img src="../google_service_account_06.png" alt=""></p> </li> </ol> <h3 id="note">Note:</h3> <p>Setting up Google BigQuery with Zing must be done using the Zing Web Console.</p> Docs: Google Cloud SQL https://docs.getzingdata.com/docs/setting-up-a-data-source/google_cloudsql_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/google_cloudsql_setup/ <p><img src="../Google_Cloud_logo.png" alt="Google Cloud SQL Logo"></p> <p>Google Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL, and SQL Server with rich extension collections, configuration flags, and developer ecosystems. It automatically ensures your databases are reliable, secure, and scalable so that your business continues to run without disruption. Cloud SQL automates all your backups, replication, encryption patches, and capacity increases.</p> <p>You can connect Zing to your MySQL database from either the <a href="https://console.getzingdata.com/">Zing web console</a>, the Zing web app, the <a href="https://apps.apple.com/us/app/zing-business-intelligence/id1563294091">iOS</a> app, or <a href="https://play.google.com/store/apps/details?id=com.getzingdata.android">Android</a>.</p> <h2 id="gathering-the-required-information">Gathering the required information</h2> <p><strong>Hostname</strong></p> <p>From the Navigation Menu on your Google SQL Cloud Console, click on &ldquo;Connections&rdquo;:</p> <p><img src="../googlesql-connections.jpg" alt="Google Cloud SQL Sidebar-Connections"></p> <p>Find the Hostname from the <strong>Public IP address</strong> under &ldquo;Networking section&rdquo;</p> <p><img src="../googlesql-public-ip.jpg" alt="Google Cloud SQL Hostname"></p> <p><strong>Port</strong></p> <p>The default port for your database engine type:</p> <ul> <li>MySQL: 3306</li> <li>PostgreSQL: 5432</li> <li>Microsoft SQL Server: N.A</li> </ul> <p><strong>Database Name</strong></p> <p>From the Navigation Menu on your Google SQL Cloud Console, click on &ldquo;Databases&rdquo;:</p> <p><img src="../googlesql-databases.jpg" alt="Google Cloud SQL Database"></p> <p>The table lists all the databases hosted on your Cloud SQL instance, identify the name of the database you wish to connect to.</p> <p><strong>Username</strong></p> <p>From the Navigation Menu on your Google SQL Cloud Console, click on &ldquo;Users&rdquo;:</p> <p><img src="../googlesql-user.jpg" alt="Google Cloud SQL Users"></p> <p>Identify the name of your user under &ldquo;User name&rdquo;</p> <p><strong>Password</strong></p> <p>Retrieve the password corresponding to the user identified. Once you enter this, Zing will automatically encrypt this.</p> <h2 id="whitelisting-zing-datas-ip-on-your-cloud-sql-instance">Whitelisting Zing Data&rsquo;s IP on your Cloud SQL Instance</h2> <p>For Zing Data to connect to your Cloud SQL instance, you must authorize Zing&rsquo;s network on the Cloud SQL console.</p> <p>From the Navigation Menu on your Google SQL Cloud Console, click on &ldquo;Connections&rdquo; and then the &ldquo;Networking&rdquo; tab on the page,</p> <p>Under the &ldquo;Authorized networks&rdquo; section, click on &ldquo;ADD A NETWORK&rdquo; to whitelist a network for the Cloud SQL instance.</p> <p><img src="../googlesql-add-network.jpg" alt="Google Cloud SQL Authorized Networks"></p> <p>Give a name for this network, i.e. &ldquo;zingdata&rdquo; and paste Zing&rsquo;s IP address: <em><strong>34.75.82.6/32</strong></em> under &ldquo;Network*&rdquo;.</p> <p><img src="../googlesql-zing-ip.png" alt="Google Cloud SQL Authorize Network"></p> <p>Scroll down and hit &ldquo;Save&rdquo; to update your changes.</p> <h2 id="adding-the-data-source-on-zing-data">Adding the data source on Zing Data</h2> <p>You are now ready to add in your data source on Zing!</p> <p>Follow these guides on adding a new data source on Zing, based on your database engine:</p> <ul> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/mysql_setup/">MySQL</a></li> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/postgresql_setup/">PostgreSQL</a></li> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/ms_sql_setup/">Microsoft SQL Server</a></li> </ul> <h2 id="connecting-via-ssl">Connecting via SSL</h2> <p><strong>Downloading your certificates and keys</strong></p> <p>To connect Zing Data to your Cloud SQL instance via the SSL protocol, you need to download the following authentication documents from Google Cloud:</p> <ul> <li>Server Root Certificate</li> <li>Client Certificate</li> <li>Client Private Key</li> </ul> <p><em>Only the server root certificate is required for Microsoft SQL Server.</em></p> <p>You can do so by clicking on &ldquo;Connections&rdquo;, then the &ldquo;Security&rdquo; tab on the page, and then &ldquo;CREATE CLIENT CERTIFICATE&rdquo;:</p> <p><img src="../googlesql-create-cert.jpg" alt="Google Cloud SQL Create Client Certificate"></p> <p>Create a name for the SSL client and download all of the files or copy the texts on to somewhere secure:</p> <p><img src="../googlesql-ssl-cert.png" alt="Downloading client credentials"></p> <p><strong>Using your certificates and keys:</strong></p> <p>On Zing&rsquo;s adding a data source page, click on &ldquo;Require SSL&rdquo; and paste the corresponding text into each text box, removing any trailing whitespace:</p> <p><img src="../googlesql-client-credentials.jpg" alt="Input client credentials on Zing"></p> Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here</a> Docs: Google Sheets https://docs.getzingdata.com/docs/setting-up-a-data-source/google_sheets_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/google_sheets_setup/ <p><a href="http://sheets.google.com/">Google Sheets</a> is a widely used cloud spreadsheet. Setting up Zing with Google Sheets is the easiest way to get started, as it requires no database connection. You can simply authenticate in with your Google credentials, or provide the URL to your Sheets.</p> <p>This is also the best way to import CSVs (assuming they are within Sheets&rsquo; <a href="https://support.google.com/drive/answer/37603?visit_id=637846239917070415-3446975440&amp;hl=en&amp;rd=1">size limitations</a>).</p> <p>You can also connect to a Microsoft Excel file by importing it into Google Sheets, then connecting that sheet to Zing.</p> <p>You can connect Zing to Google Sheets from either the <a href="https://console.getzingdata.com/">Zing web console</a>, the Zing web app, the <a href="https://apps.apple.com/us/app/zing-business-intelligence/id1563294091">iOS</a> app, or <a href="https://play.google.com/store/apps/details?id=com.getzingdata.android">Android</a>.</p> <h2 id="connection-modes">Connection Modes</h2> <p>There are two ways to connect to Google Sheets:</p> <ul> <li><strong>Live Connection</strong> mode, which will always run questions on the latest version of a sheet, and works with multiple tabs (you can choose which to make visible in Zing).</li> <li><strong>Snapshot</strong> mode, which will run questions on the version of the sheet when you first connected it to Zing, and subsequent updates to the sheet will not be updated in Zing. This mode supports a single tab.</li> </ul> <h2 id="setup-steps">Setup Steps</h2> <p>For both modes, you&rsquo;ll need:</p> <ol> <li> <p><em>A correctly formatted Google Sheet</em> with field names in the header row. Your sheet should contain only the data you wish to import. Only one table per sheet (for now). Field names should not include special characters.</p> <p><img src="../google_sheets_format.png" alt=""></p> </li> <li> <p><em>Permissions to that sheet</em> - meaning that your Google Account has at least &lsquo;view&rsquo; rights to the sheet, OR the sheet has &lsquo;available to anybody with the link&rsquo; access</p> </li> </ol> <h3 id="web-console">Web Console</h3> <p>Add a Google Sheet as a data source from the web:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;data sources&rsquo; tab</p> <p><img src="../datasources_screenshot.png" alt=""></p> </li> <li> <p>Tap &lsquo;Google Sheets&rsquo;</p> </li> <li> <p>To connect Zing to Google Sheets that are not public, authenticate into your Google account by clicking &lsquo;Access your Google Sheets&rsquo; and enabling <em>both</em> Zing read access to your Sheets, and Google Drive read permissions when prompted. Both of these permissions must be granted for Zing to list your sheets and connect to your sheets as a data source.</p> <p>From there you&rsquo;ll see a list of your Google Sheets. Select one you&rsquo;d like to import or search by name and click the name of the sheet, then click &lsquo;Select&rsquo;</p> </li> <li> <p>To connect Zing to a publicly shared (available to anybody with the link) Google Sheet, you don&rsquo;t need to authenticate into a Google account and can simply enter your Google Sheet URL.</p> <p><img src="../google_sheets_link_visibility.png" alt=""></p> </li> <li> <p>Tap &lsquo;Save&rsquo;</p> </li> <li> <p>Check for any warning messages which might indicate the sheet was incorrectly formatted.</p> </li> <li> <p>Optionally choose if you want a live connection or a one-time snapshot. If you selected &rsquo;live connection&rsquo;, choose which tabs you want to make visible to Zing.</p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> </li> </ol> <h3 id="app">App</h3> <p>To add a Google Sheet as a data source from the Zing iOS or Android apps:</p> <ol> <li>Go to the sources tab</li> <li>Tap &lsquo;Add a new data source&rsquo;</li> <li>To connect Zing to Google Sheets that are not public, authenticate into your Google account by clicking &lsquo;Access your Google Sheets&rsquo; and enabling Zing read access to your Sheets when prompted. From there you&rsquo;ll see a list of your Google Sheets. Select one you&rsquo;d like to import or search by name and click the name of the sheet, then click &lsquo;Select&rsquo;</li> <li>To connect Zing to a publicly shared (available to anybody with the link) Google Sheet, you don&rsquo;t need to authenticate into a Google account and can simply enter your Google Sheet URL.</li> <li>Optionally choose if you want a live connection or a one-time snapshot. If you selected &rsquo;live connection&rsquo;, choose which tabs you want to make visible to Zing.</li> <li>Tap &lsquo;Confirm data source&rsquo;. After a few seconds, Zing will show you if the sheet was successfully connected.</li> </ol> <h3 id="notes">Notes</h3> <p>If you use the &lsquo;Live Connection&rsquo; option to link Zing and the Google Sheet, be aware that modifying the sheet in a way that makes it improperly formatted (see above) will result in questions / graphs not loading correctly.</p> Docs: Working with Large Data Tables https://docs.getzingdata.com/docs/asking-questions/working-with-large-data-tables/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/asking-questions/working-with-large-data-tables/ <h3 id="faster-performance-with-server-side-processing">Faster Performance with Server-Side Processing</h3> <p>Zing Data is optimized to handle large datasets containing millions of rows without freezing your browser or degrading performance. For any query result that contains <strong>more than 2,000 rows</strong>, Zing automatically enables <strong>server-side processing</strong>.</p> <p>This means that instead of loading the entire dataset into your browser at once, Zing intelligently fetches only the data you need to see. When you sort, filter, or move to the next page of results, Zing sends a new, efficient query to the database server to retrieve just the specific subset of data required.</p> <p><strong>Key Benefits:</strong></p> <ul> <li><strong>Speed:</strong> View, sort, and filter massive tables almost instantly</li> <li><strong>Stability:</strong> Prevents browser crashes or slowdowns typically associated with large data loads</li> <li><strong>Scalability:</strong> Allows for effective interaction with datasets that are far too large for traditional client-side processing</li> </ul> <h3 id="key-features">Key Features</h3> <p>When working with a large data table (over 2,000 rows), you will see the following controls:</p> <h4 id="1-server-side-pagination"><strong>1. Server-Side Pagination</strong></h4> <p>At the bottom of the data table, you will find pagination controls. These allow you to navigate through your data page by page.</p> <img height="940" width="1919" src="https://docs.getzingdata.com/images/pagination.png" /> <ul> <li>The interface shows the current page number and the total number of pages (e.g., &ldquo;Page 1 of 50&rdquo;)</li> <li>You can see the range of rows currently displayed (e.g., &ldquo;Rows 1-1000 of 50000&rdquo;)</li> <li>Use the <strong>Next</strong> and <strong>Previous</strong> buttons to navigate between pages</li> </ul> <h4 id="2-server-side-sorting"><strong>2. Server-Side Sorting</strong></h4> <p>You can sort the entire dataset, not just the rows you see on the current page, by clicking on any column header.</p> <ul> <li>Click a column header once to sort in <strong>ascending order</strong></li> <li>Click the same header again to sort in <strong>descending order</strong></li> <li>An arrow icon will appear next to the column name to indicate the current sort direction</li> </ul> <h4 id="3-server-side-filtering"><strong>3. Server-Side Filtering</strong></h4> <p>You can apply filters to one or more columns to quickly find the data you need.</p> <img height="483" width="800" src="https://docs.getzingdata.com/uploads/server-side-filtering-zingdata.gif" /> <ul> <li>Click the <strong>filter icon</strong> in the column header you wish to filter</li> <li>Enter your search criteria in the text box that appears</li> <li>The table will update to show only the rows from the entire dataset that match your filter criteria</li> </ul> Docs: Excel, CSVs and JSONs https://docs.getzingdata.com/docs/setting-up-a-data-source/excel_csv/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/excel_csv/ <p>Excel (XLS, XLSX) and CSV files can be read into Zing Data directly OR can be imported into a Google Sheet:</p> <ul> <li><strong>Direct Import</strong> is fast, good for small files, and useful if you don&rsquo;t have a Google account or can&rsquo;t use Google Sheets at your organization.</li> <li><strong>Google Sheets connection</strong> allows for dynamic alerts and updates to the data which will be immediately reflected in Zing.</li> </ul> <h2 id="direct-import">Direct Import</h2> <p>Directly import CSVs and Excel files in Zing&rsquo;s mobile apps (iOS, Android) and the web.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/Mz8mUBZf3Gw" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> <p>File types supported are:</p> <ul> <li>csv</li> <li>dbf</li> <li>geojson</li> <li>json</li> <li>ndjson</li> <li>xls</li> <li>xlsx</li> </ul> <p>Files up to 10 megabytes can be uploaded on the basic (free) plan, and larger upload sizes are available on the <a href="https://getzingdata.com/pricing/">Standard, Pro and Enterprise plans</a>.</p> <p>To import a file, select the <code>Excel or CSV</code> option under &lsquo;Add Datasource&rsquo; tab on mobile + web, or from the data sources tab on the Zing <a href="https://console.getzingdata.com/datasource">web console</a>.</p> <h3 id="formatting-the-file">Formatting the file</h3> <p>In order to successfully import a file, the correct formatting should be applied to the data in the file before uploading.</p> <p><strong>Excel Files</strong>:</p> <ul> <li>The first row <strong>must contain field names</strong></li> <li>Field names should not include special characters such as <code>()./\[\]\{\}?!@#$%^&amp;\*()\_+-=</code>.</li> <li>There should not be any extra empty columns as these can result in the import to not work correctly.</li> </ul> <p><strong>JSON Files</strong>:</p> <ul> <li>The file should contain a list of objects.</li> <li>The property name should be enclosed in double quotes.</li> <li>If the value is a string or a date, that should be enclosed in double quotes too.</li> </ul> <p>An example of a correctly formatted JSON file would be as follows:</p> <pre tabindex="0"><code>[ { &#34;Mean&#34;: 315.97, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1959-11-01&#34; }, { &#34;Mean&#34;: 316.91, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1960-11-01&#34; }, { &#34;Mean&#34;: 317.64, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1961-11-01&#34; }, { &#34;Mean&#34;: 318.45, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1962-11-01&#34; }, { &#34;Mean&#34;: 318.99, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1963-11-01&#34; }, { &#34;Mean&#34;: 319.62, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1964-11-01&#34; }, { &#34;Mean&#34;: 320.04, &#34;Uncertainty&#34;: 0.12, &#34;Year&#34;: &#34;1965-11-01&#34; } ] </code></pre><h3 id="weve-added-the-ability-to-use-zing-with-an-unlimited-number-of-csv-files-join-across-them-and-addreplacedelete-them-in-much-more-flexible-ways">We&rsquo;ve added the ability to use Zing with an unlimited number of CSV files, join across them, and add/replace/delete them in much more flexible ways:</h3> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/BbRpfdtnvm4" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> <p><strong>Append: Add new data to an existing table</strong></p> <ul> <li>Add new rows to an existing table</li> <li>If the new CSV has columns that aren&rsquo;t present in the existing table, those new columns will be added</li> <li>This is the  equivalent of UNION ALL in SQL<br><br><img src="https://docs.getzingdata.com/images/csv-edit-import.gif" alt=""></li> </ul> <p><strong>Overwrite: Keep the same table name, but replace the data</strong></p> <ul> <li>All existing questions and dashboards connected to that table will work how you expect, but use the newly-uploaded data.</li> <li>The previous data in the table is deleted</li> </ul> <p><strong>Multi-file upload: Add multiple CSV or Excel files at once</strong></p> <ul> <li>Upload up to 10 MB per file (free plan) or 100 MB per file (paid plans)<br><br><img src="https://docs.getzingdata.com/images/csv-edit-multifile.gif" alt=""></li> <li>Optionally define join relationships between them to create a full queryable, multi-table data environment without needing to stand up a database</li> <li> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/7c-I-ZKbfVc" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> </li> </ul> <p><strong>CSV and Excel files can co-exist and all live within a single data source</strong></p> <ul> <li>Previously, each CSV or Excel file imported was its own &lsquo;data source&rsquo;</li> <li>Now, you can choose if you want to add a new file to an EXISTING data source, or instead create a NEW data source. Adding a file to an existing data source can make joining tables and appending / updating data easier.<br></li> </ul> <h2 id="google-sheets-connection">Google Sheets Connection</h2> <p>Excel and comma separated value files are common ways to store data. You can import these files to Zing via the Google Sheet importer.</p> <p>All of these file types are supported:</p> <ul> <li>.xls (if newer than Microsoft® Office 95)</li> <li>.xlsx</li> <li>.xlsm</li> <li>.xlt</li> <li>.xltx</li> <li>.xltm</li> <li>.ods</li> <li>.csv</li> <li>.txt</li> <li>.tsv</li> <li>.tab</li> </ul> <h3 id="import-steps">Import Steps</h3> <ol> <li> <p>First, import your (non-password-protected) file to Google Sheets:</p> <p><img src="../sheets_import.png" alt=""></p> <ul> <li>Ensure the first row contains headers.</li> <li>Every column to be imported must contain a header</li> <li>Header names must be unique within your sheet</li> <li>Exclude images, macros, tick-boxes, etc from your sheets prior to import</li> </ul> </li> <li> <p>Tap &lsquo;share&rsquo; and set link visiblity set to &lsquo;anyone with the link&rsquo;. Once the sheet is imported you can revoke this permission if you wish.</p> <p><img src="../google_sheets_link_visibility.png" alt=""></p> <p>Note that <em>unlike all other data sources in Zing</em>, Google Sheets imports are not &rsquo;live&rsquo; connections. That is, Zing takes a &lsquo;snapshot&rsquo; of the sheet at the time of import but subsequent changes to the sheet will not automatically update in Zing. If you&rsquo;d really like it to be a live connection, <a href="https://www.getzingdata.com/contact/">let us know</a>.</p> </li> <li> <p>Then follow the steps in the next section to add the Google Sheet to Zing.</p> </li> </ol> <h3 id="web-console">Web Console</h3> <p>Add a Google Sheet as a data source from the web:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;data sources&rsquo; tab</p> <p><img src="../datasources_screenshot.png" alt=""></p> </li> <li> <p>Tap &lsquo;Google Sheets&rsquo;</p> </li> <li> <p>Enter your Google Sheet URL. Your sheet&rsquo;s link visiblity must be set to &lsquo;anyone with the link&rsquo;. Once the sheet is imported, you can revoke this permission if you wish.</p> </li> <li> <p>Add the name of the table you&rsquo;d like your sheet to appear as in Zing. This will be searchable in Zing so making this reflect what the table is about will make it easier to find and use.</p> </li> <li> <p>Tap &lsquo;Save&rsquo;</p> </li> <li> <p>Check for any warning messages which might indicate the sheet was incorrectly formatted</p> </li> </ol> <ul> <li> <p>The data source you just added will be available to everybody in your organization.</p> <p>Note that Google Sheets has some <a href="https://support.google.com/drive/answer/37603?visit_id=637846239917070415-3446975440&amp;hl=en&amp;rd=1">size limitations</a> on imports.</p> </li> </ul> Docs: Snowflake https://docs.getzingdata.com/docs/setting-up-a-data-source/snowflake_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/snowflake_setup/ <p>Snowflake is one of the most commonly used cloud data warehouses, capable of ingesting data from a variety of sources, supporting robust permissioning, and allowing seamless scaling to large data sets.</p> <p>You can connect Zing to Snowflake as a data source from the <a href="https://console.getzingdata.com/">Zing web console</a> or from the Zing Data mobile / web apps.</p> <p>You&rsquo;ll need:</p> <ul> <li>An active Snowflake account</li> <li>An active Zing Data account</li> </ul> <h2 id="setup-steps">Setup Steps</h2> <ol> <li> <p>Login to the Zing web console, and click on the &lsquo;data sources&rsquo; tab</p> <p><img src="../datasources_screenshot.png" alt=""></p> </li> <li> <p>Click &lsquo;New source&rsquo;</p> </li> <li> <p>Select &lsquo;Snowflake&rsquo; as the data source.</p> <p><img src="../snowflake_dropdown.png" alt=""></p> </li> <li> <p>Enter your Snowflake credentials:</p> <ul> <li>Hostname is required. If your snowflake URL is <em><a href="https://aa11111.us-central1.gcp.snowflakecomputing.com">https://aa11111.us-central1.gcp.snowflakecomputing.com</a></em>, enter the portion following <em>https://</em> but before <em>.snowflakecomputing.com</em>. So in this example the hostname to enter would be: <em>aa11111.us-central1.gcp</em></li> <li><strong>Database</strong> is <strong>required</strong></li> <li><strong>Username</strong> is <strong>required</strong></li> <li><strong>Password</strong> is <strong>required</strong> unless you are using a private key</li> <li>Schema is optional</li> <li><strong>Private Key</strong> is optional. This is the contents of your .p8 downloaded from Snowflake if you have key-pair authentication turned on for this username.<strong><br></strong></li> </ul> </li> <li> <p>Tap &lsquo;Save&rsquo;, and Zing will confirm that a connection to the database can be established. A list of all tables in that database will then be shown.</p> <p><img src="../all_tables.png" alt=""></p> </li> <li> <p>By default, all the tables in your database will be made visible, but you can optionally turn off certain tables from being displayed by turning the switch for an individual table off, then hitting &lsquo;save&rsquo;.</p> <p><img src="../save_data_tables.png" alt=""></p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> <p>Note: Setting up Snowflake with Zing can be done both via the Zing Web Console (as outlined above), or from the Zing Data app, by clicking on the &lsquo;sources&rsquo; tab then &lsquo;add a new source&rsquo;.</p> </li> </ol> Docs: Trino / Starburst Enterprise / Starburst Galaxy https://docs.getzingdata.com/docs/setting-up-a-data-source/trino_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/trino_setup/ <p><a href="https://trino.io/">Trino</a> is an open source, highly performant, distributed query engine (formerly PrestoSQL). Starburst Enterprise is the enterprise offering of Trino and Starburst Galaxy is the cloud native and fully managed service of the Trino query engine offered by <a href="https://www.starburst.io/">Starburst</a>. Zing Data works with Trino, Starburst Enterprise and Starburst Galaxy.</p> <p>Connect Zing to your Trino database from the <a href="https://console.getzingdata.com/">Zing web console</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li> <p><em>Hostname</em> is the hostname of Trino / Starburst Enterprise / Starburst Galaxy cluster. In <a href="https://www.starburst.io/platform/starburst-galaxy/">Starburst Galaxy</a> it&rsquo;s in View Clusters &raquo; More Details &raquo; Get Connection; in Trino it depends on setup; in Starburst Enterprise Product it&rsquo;s in EKS configurations</p> <p><img src="../starburst_get_connection_info.png" alt=""></p> </li> <li> <p><em>Port</em> is the port that your cluster is live on - typically 443 by default for Trino / Starburst Enterprise / Starburst Galaxy, but your port may differ.</p> </li> <li> <p><em>Username</em> is&hellip;your username. Best practice is to create a <a href="https://getzingdata.com/blog/setting_up_read_only/">read only user.</a></p> </li> <li> <p><em>Password</em> is&hellip;your password. If you are using Starburst Galaxy, this will be the password you use to login to Starburst&rsquo;s web portal. Zing will encrypt this.</p> </li> <li> <p><em>Catalog</em> is the data source within your Trino/Starburst cluster you would like to connect to. <a href="https://trino.io/docs/current/overview/concepts.html#catalog">Read more here.</a></p> </li> <li> <p><em>Schema</em> defines a set of tables that can be queried. <a href="https://trino.io/docs/current/overview/concepts.html#schema">Read more here.</a></p> </li> <li> <p><em>Database Name</em> can be <em>any value</em> - it is just how the name data source appears in Zing but isn&rsquo;t used to connect to your cluster</p> </li> </ul> <p>Right now, Trino data sources must be set up on web (but are accessible across both Zing Web and Zing Mobile apps).</p> <p>To add a Trino data source:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;data sources&rsquo; tab</p> </li> <li> <p>Enter your Trino credentials, as outlined above.</p> <p><img src="../trino_in_list.png" alt=""></p> </li> <li> <p>Choose if you&rsquo;d like to make all tables in your schema visible, or if you&rsquo;d like to select only certain tables to be visible.</p> </li> <li> <p>Tap &lsquo;Save&rsquo;</p> </li> </ol> <ul> <li>The data source you just added will be available to everybody in your organization.</li> </ul> Docs: Controls https://docs.getzingdata.com/docs/dashboards/controls/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/dashboards/controls/ <p>Create <strong>interactive filters on dashboards</strong> so people can apply filters to one or multiple questions in a dashboard quickly. This works for all questions in Zing created with natural language, or with the visual query builder.</p> <p><strong>Quick summary:</strong></p> <ul> <li>Have control widgets that apply to one, multiple, or all questions on a dashboard</li> <li>Include control widgets: <ul> <li>Controls can be simple selections from a list, can be numerical comparisons, open text inputs, or specific dates</li> <li>Allow/disallow: <ul> <li>Search of values within a filter</li> <li>Default values for a filter</li> <li>Showing Null values in a filter</li> <li>Multi-select of values</li> </ul> </li> </ul> </li> </ul> <p><strong>Add a new control to a dashboard</strong></p> <p><img src="https://docs.getzingdata.com/images/EV-Sales-byBrand-create.gif" alt=""></p> <p>Controls are basically filters, customized for dashboard purposes. With Zing&rsquo;s dashboard controls you can navigate your data with</p> <p><strong>Create a linked dashboard control</strong></p> <p>This allows a single dashboard widget to control multiple tables, views, and charts. This works even with nested fields (E.g. <strong>city</strong> field nested under <strong>state</strong> field), and you designate one <strong>table.field</strong> as the primary which is used for showing values from that field in the drop-down to a user.</p> <p><img src="https://docs.getzingdata.com/images/linked-controls.webp" alt=""></p> <ol> <li>Add a new control widget to your dashboard or edit an existing one and select the field menu.</li> <li>Select your first field from the menu (this will be the primary field).</li> <li>Optional: Select additional fields from different tables to link to the primary field. <br>You can easily edit or select another field in the menu and make it the new primary field. Click &lsquo;Save&rsquo; to update the control widget.</li> <li>Now, one control widget can update multiple charts in your dashboard that use the linked fields.</li> <li>Verify the filters are working as expected for all linked fields and charts.</li> </ol> <p><img src="https://docs.getzingdata.com/images/linked-controls.gif" alt=""></p> <p><strong>List</strong></p> <p><img src="https://docs.getzingdata.com/images/control01-list.webp" alt=""></p> <ol> <li>Select the control type &ldquo;List&rdquo;</li> <li>Select a field</li> <li>Preview the new control with your data</li> </ol> <p><em>Extra options:</em></p> <ol> <li>Uncheck &ldquo;Drop-Down&rdquo; to get a simple list vs a drop down menu</li> <li>Uncheck &ldquo;Allow multiple selection&rdquo; so a user can only select one item</li> <li>Check &ldquo;Show Null option&rdquo; if the data includes null and you want to make it available</li> <li>Uncheck &ldquo;Show search box&rdquo; if your list is really short and search is not really needed</li> <li>Uncheck &ldquo;Show all option&rdquo; if you don&rsquo;t want that all items can be selected all at once</li> </ol> <p><strong>List with a second list (subfield)</strong></p> <p><img src="https://docs.getzingdata.com/images/control01b-list-subfield.webp" alt=""></p> <p>Add a subfield if you want a second list in your dashboard. Example as shown above with Regions in first drop-down menu and Airlines in second drop-down menu</p> <p><strong>List with no drop-down</strong></p> <p><img src="https://docs.getzingdata.com/images/control01b-list-no-dropdown.webp" alt=""></p> <p>Example above is showing a list with &ldquo;Drop-Down&rdquo; unchecked. Great for short lists and quick access.</p> <p><strong>Text</strong></p> <p><img src="https://docs.getzingdata.com/images/control02-text.webp" alt=""></p> <ol> <li>Select the control type &ldquo;Text&rdquo;</li> <li>Select a field</li> <li>Preview the new control with your data</li> </ol> <p><strong>Number</strong></p> <p><img src="https://docs.getzingdata.com/images/control03-number-min-max.webp" alt=""></p> <ol> <li>Select the control type &ldquo;Number&rdquo;</li> <li>Select a field</li> <li>By default the number control is for a single value. Select &ldquo;Min Max&rdquo; to limit results in the selected range.</li> <li>Preview the new control with your data</li> </ol> <p><strong>Date Range</strong></p> <img src="https://docs.getzingdata.com/images/date_range.png" height="580" width="500" /> <ol> <li> <p>Select the control type &ldquo;Date Range&rdquo;</p> </li> <li> <p>Select a field</p> </li> <li> <p>Choose from:</p> <ul> <li>Single date</li> <li>Standard comparisons: is, is not, after, before</li> <li>Inclusive options: after (inclusive), before (inclusive)</li> <li>Data validation: is empty, is not empty</li> <li>Range filtering: between, not between</li> <li>Relative dates: <ul> <li> <p>Week to Date (Starting Sunday)</p> </li> <li> <p>Current Week (Starting Sunday)</p> </li> <li> <p>Week to Date (Starting Monday)</p> </li> <li> <p>Current Week (Starting Monday)</p> </li> <li> <p>Month to Date</p> </li> <li> <p>Current Month</p> </li> <li> <p>Quarter to Date</p> </li> <li> <p>Current Quarter</p> </li> <li> <p>Year to Date</p> </li> <li> <p>Current Year</p> </li> <li> <p>Between a relative date (e.g. past 7 days) and future days (e.g. next 7 days)</p> </li> <li> <p>Past, Future</p> <img src="https://docs.getzingdata.com/images/mtd_options.png" height="916" width="500" /> </li> </ul> </li> </ul> </li> <li> <p>Optionally, specify a time comparison range</p> <ul> <li> <p>Previous period</p> </li> <li> <p>Previous year</p> <img src="https://docs.getzingdata.com/images/period_comparison.png" height="1071" width="500" /> <p> </p> </li> </ul> </li> <li> <p>Preview the new control with your data</p> </li> </ol> <p>Please note: with date range people can select from &ldquo;is, is not, after, greater than or equal, before less than or equal, is empty, is not empty, between, not between, relative date&rdquo;</p> <p><strong>Enhanced Dashboard Controls:</strong></p> <p><strong>Sticky Filters when Opening Questions</strong></p> <p><img height="424" width="800" src="https://getzingdata.com/images/dashboard-to-question-filters.gif" />When you click into a question from a dashboard:</p> <ul> <li>The dashboard’s filter values now appear at the top as editable drop-downs</li> <li>You can modify these without returning to the dashboard</li> <li>The question auto-refreshes with the new filter values</li> </ul> <p>This avoids the back-and-forth between dashboards and questions, saving time and clicks. This upgraded dashboard controls make filtering smoother and more intuitive.</p> <p><strong>Integration with Other Capabilities</strong></p> <p>Your filters remain consistent even when using:</p> <ul> <li><strong>Drill down</strong> to explore subgroups</li> <li><strong>See values</strong> for a breakdown</li> <li><strong>Exclude</strong> to remove a data point</li> </ul> <p>You’ll keep your filter context throughout your exploration.</p> <p><strong>Scrollable Dashboard Cards</strong></p> <p>You can now scroll dashboard cards horizontally. This is especially helpful when viewing tables with many columns or wide visualizations.</p> <p> </p> Docs: Databricks https://docs.getzingdata.com/docs/setting-up-a-data-source/databricks/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/databricks/ <p><a href="https://www.databricks.com/">Databricks</a> is cloud data platform and is an outgrowth of Apache Spark. It can run on Amazon Web Services, Microsoft Azure, or Google Cloud Platform.</p> <p>You can connect Zing to Databricks as a data source from the <a href="https://console.getzingdata.com/">Zing web console</a> (and from the Zing mobile / web apps soon!).</p> <p>You&rsquo;ll need:</p> <ul> <li>An active Databricks environment</li> <li>An active Zing Data account</li> </ul> <h2 id="setup-steps">Setup Steps</h2> <ol> <li> <p>Login to your Databricks web console and go to &lsquo;User Settings&rsquo; at the top right</p> </li> <li> <p>Under &lsquo;Access Tokens&rsquo;, click on &lsquo;Generate new token&rsquo;. Make sure you save it somewhere safe.</p> <p><img src="../databricks-generate-token.png" alt=""></p> </li> <li> <p>In the left-hand menu, switch to the &lsquo;SQL&rsquo; context and click on &lsquo;SQL Warehouses&rsquo;.</p> <p><img src="../databricks-warehouse.png" alt=""></p> </li> <li> <p>From the list of warehouses, choose the one you want to query in ZingData and click on it.</p> </li> <li> <p>Switch to the &lsquo;Connection details&rsquo; tab and save the displayed info, we will be using it shortly.</p> <p><img src="../databricks-conn-details.png" alt=""></p> </li> <li> <p>Login to the Zing web console, and click on the &lsquo;data sources&rsquo; tab.</p> <p><img src="https://docs.getzingdata.com/images/screenshot-2022-11-17-at-2-50-16-pm.png" alt=""></p> </li> <li> <p>Click &lsquo;New datasource&rsquo;.</p> </li> <li> <p>Select &lsquo;Databricks&rsquo; as the data source.</p> </li> <li> <p>Enter your Databricks host, port, path and token gathered in steps 2 and 5 above.</p> <p><img src="../databricks-add-datasource.png" alt=""></p> </li> <li> <p>Your Databricks schema can be found in Databricks by clicking &lsquo;Data&rsquo; on the lefthand navigation and then looking under &lsquo;Data Explorer&rsquo;. Enter this into Zing.</p> <p><img src="https://docs.getzingdata.com/images/screenshot-2022-11-17-at-2-49-03-pm.png" alt=""><br> <img src="https://docs.getzingdata.com/images/databricks-data-explorer.png" height="280" width="600" /></p> </li> <li> <p>Tap &lsquo;Save&rsquo;, and Zing will confirm that a connection can be established. A list of all tables in that database will then be shown.</p> </li> </ol> <p><img src="../all_tables.png" alt=""> 11. By default, all the tables in your database will be made visible, but you can optionally turn off certain tables from being displayed by turning the switch for an individual table off, then hitting &lsquo;save&rsquo;.</p> <p><img src="../save_data_tables.png" alt=""> 12. The data source you just added will be available to everybody in your organization.</p> <p>A step by step video is here:</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/CTSpEHSrMFE" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> Docs: Mozart Data https://docs.getzingdata.com/docs/setting-up-a-data-source/mozart_data/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/mozart_data/ <p>While Zing supports common databases, if you want to connect Zing to CRM, ERP, and ads reporting systems you&rsquo;ll likely want to use a third party that pulls in data from each source, standardizes it, and makes it easily queryable.</p> <p><a href="https://www.mozartdata.com/">Mozart Data</a> supports more than 300 data sources and allows for join operations across data sources, making the transformed data available to Zing as a Snowflake data source. Mozart Data supports:</p> <ul> <li>Sendgrid</li> <li>Square</li> <li>Stripe</li> <li>Amplitude</li> <li>Quickbooks</li> <li>Workday</li> <li>Google Analytics</li> <li>Facebook Ads</li> <li>Hundreds of others</li> </ul> <p>To connect Zing Data to Mozart Data, you&rsquo;ll need:</p> <ul> <li><em>A Mozart Data Account</em> which is free for a 14 day trial period</li> <li><em>A Zing Data Account</em></li> </ul> <p>Once you&rsquo;ve created both accounts</p> <ol> <li> <p>Go to the Zing web console and click the &lsquo;Data Sources&rsquo; tab then &lsquo;Add Datasource&rsquo;</p> </li> <li> <p>Select &lsquo;Snowflake&rsquo; as the data source type:</p> <p><img src="../Snowflake_1.png" alt=""></p> </li> <li> <p>Login to your <a href="https://app.mozartdata.com/login">Mozart Data dashboard</a></p> </li> <li> <p>Go to the &lsquo;Integrations&rsquo; tab, then click &lsquo;Zing Data&rsquo;</p> <p><img src="../Mozart_dash_1.png" alt=""></p> </li> <li> <p>This will display your connection information to copy + paste into Zing Data using the a &lsquo;Snowflake&rsquo; data type</p> <ul> <li><em>Hostname</em></li> <li><em>Database Name</em></li> <li><em>User Name</em></li> <li><em>Password</em></li> </ul> <p><img src="../Mozart_dash_2.jpg" alt=""></p> </li> <li> <p>Once you&rsquo;ve entered all credentials into Zing, tap <em>check connection</em> and you&rsquo;ll see a list of all tables from Mozart. If you want to limit which tables are visible, you can &rsquo;turn off&rsquo; some of the tables and they&rsquo;ll not be visible to you or other users in your organization in the Zing UI.</p> <p><img src="../table_list_mozart.png" alt=""></p> </li> <li> <p>Click &lsquo;Save&rsquo; in the bottom right and the data source will be added. It will now appear in the &lsquo;sources&rsquo; tab in the Zing app, and on the homescreen of the Zing app.</p> </li> </ol> Docs: Supabase https://docs.getzingdata.com/docs/setting-up-a-data-source/supabase/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/supabase/ <p><a href="https://supabase.com/" title="Supabase" target="_blank" rel="noopener">Supabase </a>is an open-source Firebase alternative that provides a Postgres database, Authentication, instant APIs, Edge Functions, and more. It allows developers to build scalable backends quickly.</p> <p>You can connect Zing to Supabase as a data source from the <a href="https://console.getzingdata.com/" title="Zing Data Web Console" target="_blank" rel="noopener">Zing web console</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li>An active Supabase project</li> <li>An active Zing Data account</li> </ul> <h2 id="setup-steps">Setup Steps</h2> <ol> <li> <p>Login to your Supabase project dashboard.</p> </li> <li> <p>In the top navigation bar, click on <strong>Connect</strong>.</p> <p><img src="../Supabase-Step2.png" alt=""></p> </li> <li> <p>Under the &ldquo;Connection String&rdquo; section, select <strong><code>PSQL</code></strong> as the &ldquo;Type&rdquo;. Locate the <strong><code>Connection string</code></strong> for your database. You&rsquo;ll typically find options for direct connection, session pooler, and transaction pooler. For general data visualization, the <strong><code>Session pooler</code></strong> connection string is often recommended.</p> <p><img src="../Supabase-Step3.png" alt=""></p> </li> <li> <p><strong>Copy and save this connection string somewhere safe.</strong> It will contain your host, port, database name and username.<br><img src="../Supabase-Step4.png" height="1280" width="2180" /></p> </li> <li> <p><strong>Login to the Zing web console</strong>, and click on the &lsquo;data sources&rsquo; tab.</p> <p><img src="../Supabase-Step5.png" alt=""></p> </li> <li> <p>Click &lsquo;New Data Source&rsquo;.</p> <p><img src="../Supabase-Step6.png" alt=""></p> </li> <li> <p>Select &lsquo;PostgreSQL&rsquo; as the data source.<br><img src="../Supabase-Step7.png" alt=""></p> </li> <li> <p>Enter the <strong>Host</strong>, <strong>Port</strong>, <strong>User</strong>, <strong>Password</strong>, and <strong>Database Name</strong> gathered from your Supabase connection string in step 4. Take note: Database Password is the password used on creation of the Project.</p> <p><img src="../Supabase-Step8.png" alt=""></p> <p>Steps to Reset Database Password - head to <strong>Project Settings</strong>, under <strong>Database tab</strong>, select <strong>Reset database password</strong> in the Database password section.<br><img src="../Supabase-ResetPassword.gif" alt=""></p> <p> </p> </li> <li> <p>Tap &lsquo;Check Connection&rsquo;, and Zing will confirm that a connection can be established. A list of all tables in that database will then be shown.</p> <p><img src="../Supabase-Step9.png" alt=""></p> </li> <li> <p>By default, all the tables in your database will be made visible, but you can optionally turn off certain tables from being displayed by turning the switch for an individual table off, then hitting &lsquo;save&rsquo;.</p> <p><img src="../Supabase-Step10.png" alt=""></p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> <p><img src="../Supabase-Step11.png" alt=""></p> </li> </ol> <p>A step by step video is here:</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/yD56YBCdSlw?si=rnmOxhsAR6-xWvsP" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="Zing Data Supabase Demo"></iframe> </div> Docs: Amazon Redshift https://docs.getzingdata.com/docs/setting-up-a-data-source/amazon_redshift_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/amazon_redshift_setup/ <p>Amazon Redshift is a widely used cloud data warehouse, hosted on AWS and configurable as either a cluster where you define setup parameters, or a &lsquo;serverless&rsquo; set-up.</p> <p>You can connect Zing to your Redshift cluster from either the <a href="https://console.getzingdata.com/">Zing web console</a>, and then can access it via the Zing web app, <a href="https://apps.apple.com/us/app/zing-business-intelligence/id1563294091">iOS</a> app, or <a href="https://play.google.com/store/apps/details?id=com.getzingdata.android">Android</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li><em>Hostname</em> which is the publicly accessible IP or URL for your Redshift database. Note that you&rsquo;ll need to set your database to be <a href="https://aws.amazon.com/premiumsupport/knowledge-center/redshift-cluster-private-public/">publicly accessible</a>.</li> <li><em>Port</em> which is the port that your database is live on &ndash; typically 5439 by default for Redshift, but your port may differ</li> <li><em>Database Name</em> which is the name on your hostname IP / URL you database is referenced by</li> <li><em>Username</em> which is&hellip;your database (NOT AWS!) username. Best practice is to create a <a href="https://getzingdata.com/blog/setting_up_read_only/">read only user</a></li> <li><em>Password</em> which is&hellip;your password. Once you enter this, Zing will automatically encrypt this.</li> </ul> <p>If you&rsquo;ve not already created a Redshift cluster and made it accessible to a data querying tool outside youur VPC, you&rsquo;ll need to:</p> <ul> <li> <p>Create a Virtual Private Cloud (VPC) &ndash; the default VPC is fine.</p> </li> <li> <p>Create a subnet group</p> </li> <li> <p>Expose a public IP (often using ElasticIP), allocate it, and connect it to your Redshift instance</p> </li> <li> <p>Set your Redshift cluster to &lsquo;publicly accessible&rsquo; and connect it to the IP you&rsquo;ll expose to the internet via a routing table</p> </li> <li> <p>Ensure your security group allows connections from IPv4 connections from the internet (or better, just from Zing&rsquo;s IP specifically: <em>34.75.82.6</em> )</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/9-cF9og6RFo" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> </li> </ul> <h3 id="web-console">Web Console</h3> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;data sources&rsquo; tab</p> </li> <li> <p>Enter your Redshift credentials, as outlined above.</p> </li> <li> <p>If your Redshift instance database is behind a firewall (which it always always will be), <a href="https://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-authorize-cluster-access.html">you&rsquo;ll need to allow connections from Zing&rsquo;s IP address</a>: <em><strong>34.75.82.6</strong></em></p> </li> <li> <p>Tap &lsquo;Check Connection&rsquo;</p> </li> <li> <p>You&rsquo;ll see a list of tables and views which you can allow Zing to access. By default &lsquo;Include All&rsquo; is turned on which means all database tables will be visible to Zing. But if you&rsquo;d like you can select a subset of tables to make visible to Zing.</p> </li> <li> <p>Tap &lsquo;Save&rsquo;</p> </li> <li> <p>Once you see that your connection has been successfully saved, tap &lsquo;Close&rsquo;</p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here</a> </li> </ol> Docs: Add text, links, images and web pages to your dashboards https://docs.getzingdata.com/docs/dashboards/text-images-websites/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/dashboards/text-images-websites/ <h3 id="heading"></h3> <ul> <li><strong>Create a new dashboard</strong> or open an existing one.</li> <li><strong>Select the desired widget</strong> from the widget library from the right hand panel <br>» see screenshot below.</li> <li><strong>Customize the widget</strong> with your content. You can upload images, write text, embed web pages, or link to another dashboard using the provided options.</li> <li><strong>Position the widget</strong> on your dashboard to create the desired layout.</li> </ul> <p><img src="https://docs.getzingdata.com/images/dashboard-widgets-add.webp" alt=""></p> <p><strong>Add text: change font size, color, alignment and add links</strong></p> <p><img src="https://docs.getzingdata.com/images/dashboard-widgets-texteditor.webp" alt=""></p> <p><strong>Add an image: resize and crop for the best fit</strong></p> <p><img src="https://docs.getzingdata.com/images/dashboard-widgets-imageupload.webp" alt=""></p> <p><strong>Add a web page</strong></p> <p><img src="https://docs.getzingdata.com/images/dashboard-widgets-webpage.webp" alt=""></p> <p><strong>Here is a sports related dashboard example with custom text and images</strong></p> <p><img src="https://docs.getzingdata.com/images/dashboard-full-page.webp" alt=""></p> <h2 id="how-to-link-dashboards"><strong>How to link dashboards</strong></h2> <p><img src="https://docs.getzingdata.com/images/LinkDashboards2.gif" alt=""></p> <ol> <li>Add a text widget to your dashboard</li> <li>In the text widget click Edit</li> <li>Enter single link or multiple links (you can link to multiple dashboards in one text box)</li> <li>Select link text and click on the link icon</li> <li>Select “Dashboard” radio button Select the desired dashboard from drop down menu</li> <li>Click “Ok”</li> <li>Click “Save” in the text editor window</li> </ol> <h3 id="linked-dashboard-example"><strong>Linked dashboard example</strong></h3> <p><img src="https://docs.getzingdata.com/images/Dashboards-Linked2.webp" alt=""></p> Docs: Personalization https://docs.getzingdata.com/docs/account_and_billing/personalization/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/account_and_billing/personalization/ <h2 id="get-started">Get started</h2> <p><img src="https://docs.getzingdata.com/images/zing-personalization-console.webp" alt=""></p> <p>Go to <a href="https://console.getzingdata.com/">Zing Console</a> and click on “Organizations” followed by “Settings”. Now scroll down a bit to reach the personalization section where you can:</p> <ol> <li>Upload your own logo</li> <li>Customize colors (ideally use your brand colors) which determine the color used for series 1, series 2, series 3,&hellip; colors within your graphs</li> <li>Select a different font (serif, sans serif)</li> </ol> <p><img src="https://docs.getzingdata.com/images/zing-personalization-roger-federer.webp" alt=""></p> <p>Now Zing is displaying your logo and color palette throughout the Zing platform. Your custom color palette is now applied to Series One, Two, Three, and subsequent series in your charts.</p> <p>This feature is available if your organization is on the Zing Pro plan and Zing Enterprise plan. Learn more about <a href="https://getzingdata.com/pricing/"><strong>pricing</strong></a>.</p> Docs: Microsoft SQL Server https://docs.getzingdata.com/docs/setting-up-a-data-source/ms_sql_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/ms_sql_setup/ <p>Microsoft SQL Server is one of the most widely used databases for enterprise deployments, developed by Microsoft. MS SQL is scalable and includes ETL (Extract, Transform and Load) tools and reporting services.</p> <p>You can connect Zing to your MS SQL database from the <a href="https://console.getzingdata.com/">Zing web console</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li> <p><em>Hostname</em>, which is the URL or IP address of your database</p> </li> <li> <p><em>Database Name</em>, which is the name on your hostname IP / URL, your database is referenced by</p> </li> <li> <p><em>Username</em>, which is your username. Best practice is to create a <a href="https://getzingdata.com/blog/setting_up_read_only/">read only user</a></p> </li> <li> <p><em>Password</em>, which is your password. Once you enter this, Zing will automatically encrypt this.</p> <p> </p> </li> </ul> <h3 id="web-console">Web Console</h3> <p>Add a MS SQL database from the web:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;Data Sources&rsquo; tab</p> <p><img src="../datasources-tab.png" alt=""></p> </li> <li> <p>Enter your MS SQL credentials, as outlined above.</p> <p><img src="../add-datasource.png" alt=""></p> </li> <li> <p>If your SQL Server / Azure database is behind a firewall (which it typically will be), <a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-create-server-level-portal-quickstart?view=azuresql">you&rsquo;ll need to allow connections from Zing&rsquo;s IP address</a>: <em><strong>34.75.82.6<br><br><strong>Depending on your setup, you may need to set up port port forwarding on your router for port 1433 (assuming you are using the SQL Server default port) to the server your database resides on</strong><br></strong></em></p> </li> <li> <p>Ensure that TCP/IP protocol is enabled on SQL server (<a href="https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/enable-or-disable-a-server-network-protocol?view=sql-server-ver16" target="_blank" rel="noopener">instructions here</a>)</p> <p> </p> </li> <li> <p>Tap &lsquo;Check Connection&rsquo;</p> </li> <li> Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here</a> </li> <li> <p>Choose the tables you want to include and tap &lsquo;Save&rsquo;.</p> <p><img src="../table-selection.png" alt=""></p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> </li> </ol> Docs: User Roles https://docs.getzingdata.com/docs/inviting-teammates-collaboration/user-roles-and-permissions/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/inviting-teammates-collaboration/user-roles-and-permissions/ <h2 id="user-roles-in-an-organization">User roles in an organization</h2> <p>User roles in Zing Data are defined at two levels:</p> <ul> <li><strong>Organization-level roles</strong>: Set a user’s access across all questions and data sources.</li> <li><strong>Question-level roles</strong>: Can override org roles to grant more permissive access to specific questions.</li> </ul> <p>By default, an organization-level role governs access unless a more permissive question-level role is granted.</p> <p>There are five levels of user roles within an organization, ranked from low to high in terms of permissiveness:</p> <p>A <strong>Limited Viewer</strong> can:</p> <ul> <li>Only access specific <strong>questions</strong> or <strong>dashboards</strong> that have been explicitly shared with them</li> </ul> <p><em>A <strong>Limited Viewer</strong> cannot:</em></p> <ul> <li><em>Ask new questions</em></li> <li><em>View any questions that were not explicitly shared with them.</em></li> <li><em>Share questions</em></li> <li><em>Export questions to CSV</em></li> </ul> <p>A <strong>viewer</strong> can:</p> <ul> <li>View and comment on questions</li> <li>Create alerts on questions</li> <li>Save questions as photos</li> </ul> <p><img src="https://docs.getzingdata.com/images/viewer-interface.png" alt=""></p> <p>When a viewer logs in, they are automatically directed to the &lsquo;app&rsquo; view, which offers a simplified experience focused on interacting with existing questions. They do not see the console screen, tables, joins, or data sources.</p> <p>A <strong>member can do everything a viewer can, AND:</strong></p> <ul> <li>Create, copy, edit, and delete their own questions and dashboards</li> <li>Share questions and dashboards</li> <li>Save data tables as CSVs</li> </ul> <p><img src="https://docs.getzingdata.com/images/member-interface.png" alt=""></p> <p>When a member logs in, they are also automatically directed to the &lsquo;app&rsquo; view, providing a cleaner, more minimalist home screen experience. This streamlined interface is ideal for users who primarily interact with existing questions and dashboards and do not frequently create new content or manage data sources. Members do not see the console screen, tables, joins, or data sources.</p> <p>To ensure a user sees this intended member view upon login, the following conditions must be met:</p> <ul> <li><strong>Single Organization Membership:</strong> The user&rsquo;s account can only be associated with <strong>one</strong> organization.</li> <li><strong>No Owner or Admin Roles Elsewhere:</strong> The user must not hold an <strong>Owner</strong> or <strong>Admin</strong> role in any other Zing Data organization. These higher-level roles grant access to the console and data management features, which are intentionally hidden in the member view.</li> </ul> <p><em>*Please note that a user invited to your organization with the <strong>Member</strong> role has certain restrictions designed to maintain the simplified, streamlined experience of the member view. If a user invited as a Member is part of multiple organizations or holds an Owner/Admin role elsewhere, their initial login experience might differ from the intended member view.</em></p> <p>An <strong>editor can do everything a member can, AND:</strong></p> <ul> <li>View and query tables in the Console</li> <li>Edit and delete questions where they are listed as an editor</li> </ul> <p>An <strong>admin do Everything an Editor can, AND:</strong></p> <ul> <li>Invite and remove users from the organization</li> <li>Manage user roles</li> <li>Create, edit, and delete data sources</li> <li>Upgrade, downgrade, or cancel an organizations plan</li> <li>Get Embedded Analytics API Keys</li> <li>Turn on/off external link sharing, the SQL IDE option, and &lsquo;skinning&rsquo; options</li> <li>Create AI examples and ghost text to improve natural language performance</li> </ul> <p><strong>Special note for Admins:</strong></p> <ul> <li>You can specify a role when you invite users to your organization</li> <li>Only you can add and delete data sources in console or web app</li> </ul> <p><img src="https://docs.getzingdata.com/images/console-add-user.webp" alt=""></p> <h2 id="user-roles-on-a-question">User roles on a question</h2> <p>You can specify user roles when sharing questions with other users.</p> <p><img src="https://docs.getzingdata.com/images/user-roles-invite.webp" alt=""></p> <p>When a user&rsquo;s role on a question differs from their role within the organization, the more permissive role will be in effect.</p> <h2 id="managing-organization-users">Managing Organization Users</h2> <p>As an <strong>Admin</strong> or <strong>Owner</strong>, you have the ability to manage users within your organization directly from the web console. This includes changing their assigned roles or removing them from the organization entirely.</p> <p><img src="https://docs.getzingdata.com/images/screenshot-2025-07-01-120547.png" alt=""></p> <p><strong>Changing User Roles</strong></p> <p>You may need to update a user&rsquo;s role to grant them more permissions (e.g., promoting a <strong>Member</strong> to an <strong>Editor</strong>) or restrict their access.</p> <p>To change a user&rsquo;s role:</p> <ol> <li>Navigate to <strong>Organizations</strong> from the main menu.</li> <li>Tap on <strong>Settings</strong> of the chosen Organization.</li> <li>You will see a list of all users in your organization under the <strong>Users</strong> section.</li> <li>To change a user’s permissions, tap <strong>Update Roles</strong> and select their new role (<strong>Viewer</strong>, <strong>Member</strong>, <strong>Editor</strong>, or <strong>Admin</strong>).</li> </ol> <p>The user’s permissions are updated instantly.</p> <p><strong>How to Remove a User</strong></p> <p>When a team member no longer requires access to your organization&rsquo;s data, you can remove them completely. This action will revoke all access to your Zing environment, including shared dashboards and data sources.</p> <ol> <li>Navigate to <strong>Organizations</strong> from the main menu.</li> <li>Tap on <strong>Settings</strong> of the chosen Organization.</li> <li>You will see a list of all users in your organization under the <strong>Users</strong> section.</li> <li>To remove a user from the organization entirely, simply tap the <strong>Remove</strong> button next to their name.</li> </ol> <p>The user will no longer be able to access your Zing organization.</p> <h2 id="leaving-an-organization">Leaving an Organization</h2> <p>Users of <strong>All Roles</strong> <em>except</em> <em><strong>Owners</strong></em> can remove themselves from an organization at any time. This action is performed from the <strong>Organization Settings</strong> page. Owners cannot remove themselves and must transfer ownership of the organization to another Zing Data user before leaving the organization.<br><img height="839" width="1898" src="https://docs.getzingdata.com/images/screenshot-2025-07-01-121618.png" /></p> Docs: Clickhouse https://docs.getzingdata.com/docs/setting-up-a-data-source/clickhouse_setup/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/clickhouse_setup/ <p>Clickhouse is an open-source database management system (DBMS) for online analytical processing (OLAP). It uses a column-based structure. Clickhouse was designed to be fast and highly-scalable. Clickhouse stands out for high performance because it gives attention to low level details when performing queries.</p> <p>You can connect Zing to your Clickhouse database from the <a href="https://console.getzingdata.com/">Zing web console</a>.</p> <p>You&rsquo;ll need:</p> <ul> <li><em>Hostname</em>, which is the URL or IP address of your database</li> <li><em>Database Name</em>, which is the name on your hostname IP / URL, your database is referenced by</li> <li><em>Username</em>, which is your username. Best practice is to create a <a href="https://getzingdata.com/blog/setting_up_read_only/">read only user</a></li> <li><em>Password</em>, which is your password. Once you enter this, Zing will automatically encrypt this.</li> </ul> <p>If you require the connection to be secure, three additional fields would be required:</p> <ul> <li><em>Server Root Certificate</em></li> <li><em>Client Key</em></li> <li><em>Client Certificate</em></li> </ul> <p>The <a href="https://clickhouse.com/docs/en/guides/sre/ssl-user-auth#1-create-ssl-user-certificates">Clickhouse documentation</a> provides more information about generating certificates to connect via SSL.</p> <h3 id="web-console">Web Console</h3> <p>Add a Clickhouse database from the web:</p> <ol> <li> <p>Go to your <a href="https://console.getzingdata.com/dashboard">Zing Data Web Console</a> and ensure you are logged in</p> </li> <li> <p>Tap the &lsquo;Data Sources&rsquo; tab</p> <p><img src="../datasources-tab.png" alt=""></p> </li> <li> <p>Enter your Clickhouse credentials, as outlined above.<br><br>If you are connecting to Clickhouse Cloud, you&rsquo;ll typically want to use <strong>port 8443 and &lsquo;use SSL&rsquo;</strong>. Your connection host will be something like <em><a href="https://xxxxx123.us-east-1.aws.clickhouse.cloud">https://xxxxx123.us-east-1.aws.clickhouse.cloud</a></em></p> <p><img src="../add-clickhouse-datasource.png" alt=""></p> </li> <li> <p>If your Clickhouse database is behind a firewall (which it typically will be), you&rsquo;ll need to allow connections from Zing&rsquo;s IP address: <em><strong>34.75.82.6</strong></em></p> </li> <li> <p>Tap &lsquo;Check Connection&rsquo;</p> </li> <li> Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, <a id="contact_link" href="mailto:hello@getzingdata.com">reach out to Zing support here</a> <div class="c-card c-card--clickable"><div class="c-card__preview"><p class="u-hide-when-loaded">No preview available</p></div><div class="c-card__content"><div class="c-card__heading"><div class="c-card__icon "><cc-icon name="mdi:question_mark" class="u-hide-when-loaded"></cc-icon></div><div class="c-card__heading-content"><p class="c-card__text ">Unknown Shortcode</p><p class="c-card__subtext">contact</p></div></div></div></div> <img src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" width="15" title="Click and drag to move" height="15" role="presentation" draggable="true" /> <div class="c-card c-card--clickable"><div class="c-card__preview"><p class="u-hide-when-loaded">No preview available</p></div><div class="c-card__content"><div class="c-card__heading"><div class="c-card__icon "><cc-icon name="mdi:question_mark" class="u-hide-when-loaded"></cc-icon></div><div class="c-card__heading-content"><p class="c-card__text ">Unknown Shortcode</p><p class="c-card__subtext">contact</p></div></div></div></div> <img src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" width="15" title="Click and drag to move" height="15" role="presentation" draggable="true" /> </li> <li> <p>Choose the tables you want to include and tap &lsquo;Save&rsquo;.</p> <p><img src="../clickhouse-table-selection.png" alt=""></p> </li> <li> <p>The data source you just added will be available to everybody in your organization.</p> <p><img src="../clickhouse-datasource.png" alt=""></p> </li> </ol> Docs: Connnecting to AWS RDS https://docs.getzingdata.com/docs/troubleshooting/aws_rds/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/troubleshooting/aws_rds/ <p>Zing Data can connect to any AWS RDS database, but there are a few steps to go through to allow Zing&rsquo;s platform to access.</p> <h2 id="steps">Steps</h2> <ol> <li>Go to your AWS console</li> <li>Go to RDS and select the database you want to view on Zing Data.</li> <li>Then look for the security group shown below <img src="../aws_rds_securitygroup.png" alt=""></li> <li>Confirm that the instance is <code>Publicly Accessible</code></li> </ol> <p><img src="../aws_rds_securitygroup2.png" alt=""></p> <ol start="5"> <li>Now hit the edit button for the inbound rules for the security group. <img src="../aws_rds_securitygroup_inbound.png" alt=""></li> <li>Add a single rule for the database type and port that it is running on. The screenshot shows two inbound rules that have been added for mySQL on standard port 3306 and one for Postgres on standard port 5432. The IP address for Zing Data&rsquo;s platform is <code>34.75.82.6</code> <img src="../aws_rds_securitygroup_ruleszing.png" alt=""></li> <li>That&rsquo;s it. You&rsquo;re done!</li> </ol> Docs: Natural Language Queries https://docs.getzingdata.com/docs/troubleshooting/natural-language-queries/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/troubleshooting/natural-language-queries/ <p>There are three primary methods to more precisely control Natural Language responses in Zing:</p> <ol> <li><strong>Examples:</strong> Define specific examples to clarify ambiguous terms and calculations. <ol> <li>Regular</li> <li><a href="https://docs.getzingdata.com/docs/guided-analysis/">Analysis Question</a></li> <li>Run question as custom SQL if exact match</li> </ol> </li> <li><strong>Aliases</strong>: Create human-readable labels for databases, fields, and calculations to improve query interpretation.</li> <li><strong>Exact Responses</strong>: Specify exact SQL queries for complex or highly specific questions.</li> </ol> <h2 id="11-example-regular">1.1 Example: Regular</h2> <p>Even the best AI needs a little bit of help from time to time to understand your data and questions better. With Zing, you can clarify ambiguous terms and calculations quickly by adding a few training examples to your data source.</p> <p>Ambiguous terms are words or phrases that have multiple meanings or interpretations, which can lead to confusion or inaccuracies in the AI&rsquo;s response. For example, the word &ldquo;bark&rdquo; can refer to the sound a dog makes or the outer covering of a tree, and without context, an AI might not understand which meaning is intended.</p> <p>Similarly, ambiguous calculations are those where the operations or variables are not clearly defined or could be interpreted in multiple ways. For example, if someone asks an AI to &ldquo;calculate the increase,&rdquo; without specifying what to increase, by how much, or over what time period, the AI would not be able to provide a correct answer.</p> <p><strong>Example Question and how to fine tune the response <br>Q:</strong> How many trips are long by plan type?<br><strong>Task:</strong> We want to define &ldquo;long&rdquo; as being greater than 10 minutes</p> <p><strong>Step 1: Go to Zing Console and select a data source</strong></p> <ul> <li>Web console: <a href="https://console.getzingdata.com/"><strong><u>https://console.getzingdata.com/</u></strong></a></li> <li>Select your data source you want to train AI on</li> <li>Go to the <strong>Examples</strong> tab and enter your questions and corresponding SQL.</li> </ul> <img src="https://docs.getzingdata.com/images/docs-nlq-example.webp" alt="Zing Data Source" height="1587" width="1800" /> <p><strong>Step 2: Go to Zing App</strong></p> <p>Ask &ldquo;How many trips are long by plan type?&rdquo; and see how AI is now showing a visualization with a filter automatically applied with trips that are longer than 10 minutes!</p> <img src="https://docs.getzingdata.com/images/docs-nlq-response.webp" alt="Zing App AI Response" height="1617" width="1800" /> <h2 id="2-aliases">2. <strong>Aliases</strong></h2> <p>Creating human-readable labels ensures your analysis is easily understood by others.<br>With Zing, you can alias <strong>databases, fields, and calculations</strong>, enhancing clarity and interpretability across all queries.</p> <p><strong>To Create a Database Alias:</strong></p> <ul> <li>Go to the data source &rsquo;edit&rsquo; screen in the Zing Data web console.</li> <li>Specify a display name; this will be shown within the Zing app.</li> <li>If left blank, the original database name will be used.</li> </ul> <img src="https://docs.getzingdata.com/images/database.png" height="922" width="1942" /> <p><strong>To Create a Field Alias:</strong></p> <ul> <li>Go to the data source settings in the Zing web console.</li> <li>Select &lsquo;alias&rsquo; and then &lsquo;add/edit.&rsquo;</li> <li>Choose the fields to alias and save.</li> </ul> <p>These aliases help the AI translate natural language questions into accurate query results.</p> <img src="https://docs.getzingdata.com/images/field.png" height="1002" width="1706" /> <p><strong>To Create a Calculation Alias:</strong></p> <ul> <li>Go to the data source settings and navigate to the Examples tab.</li> <li>Create a new example by specifying the question text and corresponding SQL.</li> </ul> <p>For example, defining &ldquo;utilization&rdquo; as select sum(hours_worked)/sum(hours_available) as utilization from mytable allows you to use &ldquo;utilization&rdquo; in natural language queries effectively.</p> <img src="https://docs.getzingdata.com/images/calculation.png" height="938" width="1754" /> <h2 id="3-creating-exact-responses">3. <strong>Creating Exact Responses</strong></h2> <p>Sometimes a question requires SQL complexity beyond what SwiftQuery can handle. In these cases, you can define an exact response that the AI will use.</p> <p><strong>How It Works:</strong></p> <ul> <li>When a user asks a question that matches an exact response, the AI will run the specified SQL directly.</li> <li>Exact responses can include complex SQL, including <em><strong>CTEs</strong></em> and <em><strong>subqueries.</strong></em></li> </ul> <p><strong>Please Note:</strong></p> <ul> <li> <p>Define a question in the Examples tab with the corresponding SQL.</p> </li> <li> <p>If a user&rsquo;s query is an exact match, the system executes the SQL; otherwise, it maps to SwiftQuery.<br></p> <img src="https://docs.getzingdata.com/images/exact.png" height="1204" width="2984" /> </li> </ul> <h4 id="in-addition-helper-text">In Addition: Helper Text</h4> <p>You can also create ghost text to guide a user. Ghost text provides a prompt within the input field, offering suggestions on what users might want to ask. This helps users frame their questions more effectively, ensuring they get the most relevant responses.<br><br><strong>How It Works</strong></p> <ul> <li>Click on &lsquo;Data Sources&rsquo;</li> <li>Click on &lsquo;Settings&rsquo; of your chosen data source</li> <li>Use the Aliases, Examples, or Helper Text functions<br></li> </ul> <img src="https://docs.getzingdata.com/images/helpertext.png" height="616" width="1582" /> <p> </p> Docs: Amplitude https://docs.getzingdata.com/docs/setting-up-a-data-source/amplitude/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/amplitude/ <p><a href="https://amplitude.com/">Amplitude Analytics</a> is one of the broadly used tools for storing user events, generating cohorts, and taking a deeper look into user journeys throughout your app or website.</p> <p>But having this data live only in Amplitude, visible and queryable only from a computer limits your team&rsquo;s ability to understand what is happening with users in real-time.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/SB9BsozjbnI" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> <p>There are three main steps:</p> <ul> <li><a href="https://www.docs.developers.amplitude.com/data/destinations/bigquery/">Sync Amplitude Data to Google BigQuery</a> to regularly (even 10 minutes in our case) push all user events in near real-time to your cloud data warehouse</li> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/google_bigquery_setup/">Set up Google BigQuery as a data source for Zing Data</a>, including how to handle service accounts and permissions</li> <li><a href="https://docs.getzingdata.com/docs/asking-questions/">Query Amplitude analytics events from Zing&rsquo;s iOS, Android, and web apps in just a few taps, and save analysis for easy re-use</a></li> </ul> <h2 id="step-1-syncing-amplitude-data-to-google-bigquery-or-snowflake--redshift">Step 1: Syncing Amplitude Data to Google BigQuery (or Snowflake / Redshift)</h2> <ol> <li>Login to  Amplitude, then click the <strong>Data</strong> tab, then <strong>Destinations</strong> tab. <br> <img src="../amplitude_data_tab.png" alt=""></li> <li>Click <strong>new destination</strong> and select BigQuery, Snowflake, or Redshift <br> <img src="../amplitude_destination.png" alt=""></li> <li>Select the data you&rsquo;d like to export export frequency</li> <li>Review the schema and click <strong>Next</strong>.</li> <li>Specify the dataset in the cloud data warehouse to receive your Amplitude data. If you&rsquo;re connecting to Google BigQuery, upload the service account key file. This file must be in JSON format. Instructions for creating a service account in <a href="https://www.docs.developers.amplitude.com/data/destinations/bigquery/#considerations">BigQuery with the appropriate permissions are here</a>. <br> <img src="../amplitude_destinations.png" alt=""></li> <li>Click <strong>Next</strong>. Amplitude connects to your warehouse upload is successful, click <strong>Finish</strong> to complete the process.</li> </ol> <h2 id="step-2-set-up-bigquery-or-snowflake--redshift-with-zing-data">Step 2: Set up BigQuery (or Snowflake / Redshift) with Zing Data</h2> <ul> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/google_bigquery_setup/">Instructions to connect BigQuery to Zing Data are here</a></li> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/snowflake_setup/">Instructions to connect Snowflake to Zing Data are here</a></li> <li><a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/amazon_redshift_setup/">Instructions to connect Amazon Redshift to Zing Data are here</a></li> </ul> Docs: Google Analytics 4 https://docs.getzingdata.com/docs/setting-up-a-data-source/google-analytics-4/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/setting-up-a-data-source/google-analytics-4/ <p>Google Analytics 4 (GA4) is a supported data source for Zing Data, via a BigQuery connection. This lets you leverage Zing Data for streamlined query generation, mobile access, dashboard creation, and real-time alerts on top of your GA4 data.</p> <p>Zing Data is a trusted <a href="https://cloud.withgoogle.com/partners/detail/?id=zing-data&amp;hl=en-US">Google Cloud Partner</a>.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://www.youtube.com/embed/Yry5L3L7nR8" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe> </div> <h3 id="step-1-set-up-google-analytics-4">Step 1: Set Up Google Analytics 4</h3> <p>First ensure that your website has Google Analytics 4 properly configured. GA4 offers a wealth of user behavior data that you&rsquo;ll be tapping into. Once your GA4 account is in place, proceed to the Google Analytics dashboard at <a href="http://analytics.google.com">analytics.google.com</a>.</p> <h3 id="step-2-create-a-bigquery-project">Step 2: Create a BigQuery Project</h3> <ol> <li>If you don&rsquo;t have a BigQuery project, head over to <a href="http://cloud.google.com">cloud.google.com</a> and create one (free tier available).</li> <li>Enable the BigQuery API for your project.</li> </ol> <h3 id="step-3-link-google-analytics-4-to-bigquery">Step 3: Link Google Analytics 4 to BigQuery</h3> <ol> <li>Navigate to the Admin section in Google Analytics.</li> <li>Scroll down and locate &ldquo;BigQuery Link&rdquo; under &ldquo;Data Streams.&rdquo;</li> <li>Click &ldquo;Link&rdquo; to establish a connection between your GA4 account and BigQuery.</li> </ol> <h3 id="step-4-wait-24-48-hours">Step 4: Wait 24-48 hours</h3> <p>GA4 data does not immediately sync to BigQuery and it can take even a few days (more than 24 hours from our testing) before you start seeing GA4 tables and events in BigQuery.</p> <h3 id="step-5-set-up-a-view-with-data-from-all-individual-days-of-events">Step 5: Set up a view with data from all individual days of events</h3> <ol> <li> <p>Within the BigQuery section of <a href="http://cloud.google.com">cloud.google.com</a>, click **new query **from one of the event tables which has been populated by GA4. It will look something like <strong>events_20230817</strong> or <strong>events_intraday_20230817</strong></p> </li> <li> <p>Create a query with the following text, then <strong>save</strong> and <strong>save as view</strong></p> <p><em><strong>SELECT * FROM &lsquo;&lt;PROJECT_ID&gt;.&lt;DATASOURCE_ID&gt;.events_*`</strong></em></p> </li> </ol> <p>This combines all daily events tables to make them queryable as a single table, similar to a UNION ALL of the events_day1, events_day2, etc.</p> <h3 id="step-6-configure-a-service-account-for-bigquery">Step 6: Configure a Service Account for BigQuery</h3> <ol> <li>Access the &ldquo;Credentials&rdquo; section under &ldquo;APIs &amp; Services&rdquo; in Google Cloud.</li> <li>Create a new service account, granting it necessary permissions (e.g., BigQuery Data Viewer, BigQuery Job User).</li> <li>Download the service account JSON file containing credentials.</li> </ol> <h3 id="step-7-connect-zing-data-to-bigquery">Step 7: Connect Zing Data to BigQuery</h3> <ol> <li>Log in to Zing Data.</li> <li>Connect Zing Data to your Google BigQuery project using the service account details.</li> <li>Select the desired datasets and tables</li> </ol> <h3 id="step-8-craft-data-queries-with-zing-data">Step 8: Craft Data Queries with Zing Data</h3> <ol> <li>From the Zing Data home screen, click on the events view you created in step 5</li> <li>Leverage natural language to generate queries for your GA4 data by typing in the search bar at the top.</li> <li>Access these queries via your mobile device for on-the-go insights.</li> <li>Combine queried data to create meaningful dashboards and visualizations by adding questions to a dashboard.</li> <li>Set up real-time alerts based on specific data thresholds by tapping the top right three dots on any question with a time series.</li> </ol> <h3 id="conclusion">Conclusion</h3> <p>By connecting Google Analytics 4 with BigQuery and Zing Data, you&rsquo;ve unlocked a powerful mechanism for harnessing insights from user behavior with the flexible power of natural language querying, SQL, or easy visual querying with SwiftQuery.</p> <p>This integration empowers you to analyze trends, track performance, and make informed decisions for your business, all while enjoying the convenience of natural language query generation, mobile access, and real-time alerts. Best of all, the free tiers offered by BigQuery and Zing Data make this powerful capability accessible to businesses of all sizes.</p> <h4 id="note">Note:</h4> <p>Setting up Google BigQuery with Zing must be done using the Zing Web Console.</p> Docs: Connnecting to Google Cloud SQL https://docs.getzingdata.com/docs/troubleshooting/googlecloudsql/ Mon, 01 Jan 0001 00:00:00 +0000 https://docs.getzingdata.com/docs/troubleshooting/googlecloudsql/ <p>Zing Data can connect to any Google Cloud SQL database, but there are a few simple steps to enable access for the Zing Data platform.</p> <h2 id="steps">Steps</h2> <ol> <li> <p>Go to your GCP console <a href="https://console.cloud.google.com">here</a></p> </li> <li> <p>Select <code>SQL</code> from the sidebar shown here</p> <figure> <img src="../gcpsql_01-800.png"/> </figure> </li> <li> <p>Select <code>Connections</code> from the sidebar for the mySQL, postgres or SQL Server Cloud SQL instance you want to connect to Zing Data.</p> <figure> <img src="../gcpsql_02.png"/> </figure> </li> <li> <p>Now hit the <code>Networking</code> tab to be able to manage the ip allow lists for your instance.</p> <figure> <img src="../gcpsql_03.png"/> </figure> </li> <li> <p>Here you can add Zing Data&rsquo;s IP as an allow list = <code>34.75.82.6</code></p> <figure> <img src="../gcpsql_04.png"/> </figure> <figure> <img src="../gcpsql_05.png"/> </figure> </li> <li> <p>After you&rsquo;ve saved this configuration, you can now add your CloudSQL instance as a datasource in the Zing Console (instructions <a href="https://docs.getzingdata.com/docs/setting-up-a-data-source/google_cloudsql_setup/">here</a>)</p> </li> <li> <p>That&rsquo;s it. You&rsquo;ve now successfully configured a Google CloudSQL instance with Zing Data. Happy Querying!</p> </li> </ol>