<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>metabase Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/metabase/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/metabase/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Tue, 05 Aug 2025 08:11:56 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>metabase Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/metabase/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Integrate Metabase in Ruby on Rails</title>
		<link>https://www.clever.cloud/blog/engineering/2020/05/14/metabase-integration-ruby-rails/</link>
		
		<dc:creator><![CDATA[Valeriane Venance]]></dc:creator>
		<pubDate>Thu, 14 May 2020 14:46:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[metabase]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2020/05/14/metabase-integration-ruby-rails/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="metabasebanner 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Today, I am  proposing a very simple tutorial. I needed to integrate a Metabase dashboard in one of my applications and I realized there is no article which explains how to do that. So, ta-da!</p>
<span id="more-2825"></span>

<h2 id="requirements">Requirements</h2>
<p>To follow this tutorial, you will need</p>
<ul>
<li>a Metabase dashboard (read <a href="https://www.clever.cloud/blog/engineering/2019/02/20/how-to-install-metabase/">this article</a> from my fellow Laurent Dogin to have yours set up in a few minutes)</li>
<li>a Ruby on Rails application (read <a href="https://www.clever.cloud/blog/engineering/2019/05/07/setup-your-ruby-on-rails-online-dev-environment/">this article</a> by me if you need to set up one)</li>
</ul>
<h2 id="enabling-integration-in-metabase">Enabling integration in Metabase</h2>
<p>From your Metabase, click on the top right <strong>gear icon</strong>, then <strong>Admin</strong>. On the left menu select <strong>Embedding in other Applications</strong>. Toggle the button to have it saying <strong>Enabled</strong>. You will now get an Embedding API key. Save it for later.</p>
<figure style="position:relative;width:100%;height:auto;margin:0 auto">
  <img data-action="zoom"  alt="Enable integrations on Metabase" src="https://cdn.clever-cloud.com/uploads/2021/08/metabase-integration-screenshot.png"/>
</figure>

<p>Leave Metabase admin and select the dashboard you want to integrate. Click the sharing and embedding icon on the top right of your dashboard. Now select <strong>Embed this dashboard in an Application</strong>. Finally, click on the <strong>Publish</strong> button.</p>
<h2 id="integrate-metabase-in-rails">Integrate Metabase in Rails</h2>
<p>In your Gemfile, add <code>gem &#39;jwt&#39;</code> then run <code>$ bundle install</code>. If your application is deployed on Clever Cloud go to your application&#39;s console and under your application&#39;s menu go to the <strong>environment variables</strong> menu. If you deploy locally, use the <a href="https://github.com/laserlemon/figaro">gem figaro</a> and edit your application.yml. Anyway you must add two environment variables</p>
<pre><code class="language-yaml">METABASE_SITE_URL: &lt;your metabase url&gt;
METABASE_SECRET_KEY: &lt;the API key from metabase admin&gt;
</code></pre>
<p>In the controller action where you want to integrate your metabase dashboard, add the following lines:</p>
<pre><code class="language-ruby">payload = {
          :resource =&gt; {:dashboard =&gt; &lt;your dashboard number&gt;},
          :params =&gt; { },
          :exp =&gt; Time.now.to_i + (60 * 10) # 10 minute expiration
    }
token = JWT.encode(payload, ENV[&quot;METABASE_SECRET_KEY&quot;])
@iframe_url = ENV[&quot;METABASE_SITE_URL&quot;] + &quot;/embed/dashboard/&quot; + token + &quot;#bordered=true&amp;titled=true&quot;
</code></pre>
<p>Now in your view, add</p>
<pre><code class="language-html">&lt;iframe
    src=&quot;&lt;%= @iframe_url %&gt;&quot;
    frameborder=&quot;0&quot;
    width=&quot;800&quot;
    height=&quot;600&quot;
    allowtransparency
&gt;&lt;/iframe&gt;
</code></pre>
<p>You are all set. Just restart your application so the new environment variables are taken in consideration. Voilà, your application now has an integrated Metabase dashboard.</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="metabasebanner 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/metabasebanner-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Today, I am  proposing a very simple tutorial. I needed to integrate a Metabase dashboard in one of my applications and I realized there is no article which explains how to do that. So, ta-da!</p>
<span id="more-2825"></span>

<h2 id="requirements">Requirements</h2>
<p>To follow this tutorial, you will need</p>
<ul>
<li>a Metabase dashboard (read <a href="https://www.clever.cloud/blog/engineering/2019/02/20/how-to-install-metabase/">this article</a> from my fellow Laurent Dogin to have yours set up in a few minutes)</li>
<li>a Ruby on Rails application (read <a href="https://www.clever.cloud/blog/engineering/2019/05/07/setup-your-ruby-on-rails-online-dev-environment/">this article</a> by me if you need to set up one)</li>
</ul>
<h2 id="enabling-integration-in-metabase">Enabling integration in Metabase</h2>
<p>From your Metabase, click on the top right <strong>gear icon</strong>, then <strong>Admin</strong>. On the left menu select <strong>Embedding in other Applications</strong>. Toggle the button to have it saying <strong>Enabled</strong>. You will now get an Embedding API key. Save it for later.</p>
<figure style="position:relative;width:100%;height:auto;margin:0 auto">
  <img data-action="zoom"  alt="Enable integrations on Metabase" src="https://cdn.clever-cloud.com/uploads/2021/08/metabase-integration-screenshot.png"/>
</figure>

<p>Leave Metabase admin and select the dashboard you want to integrate. Click the sharing and embedding icon on the top right of your dashboard. Now select <strong>Embed this dashboard in an Application</strong>. Finally, click on the <strong>Publish</strong> button.</p>
<h2 id="integrate-metabase-in-rails">Integrate Metabase in Rails</h2>
<p>In your Gemfile, add <code>gem &#39;jwt&#39;</code> then run <code>$ bundle install</code>. If your application is deployed on Clever Cloud go to your application&#39;s console and under your application&#39;s menu go to the <strong>environment variables</strong> menu. If you deploy locally, use the <a href="https://github.com/laserlemon/figaro">gem figaro</a> and edit your application.yml. Anyway you must add two environment variables</p>
<pre><code class="language-yaml">METABASE_SITE_URL: &lt;your metabase url&gt;
METABASE_SECRET_KEY: &lt;the API key from metabase admin&gt;
</code></pre>
<p>In the controller action where you want to integrate your metabase dashboard, add the following lines:</p>
<pre><code class="language-ruby">payload = {
          :resource =&gt; {:dashboard =&gt; &lt;your dashboard number&gt;},
          :params =&gt; { },
          :exp =&gt; Time.now.to_i + (60 * 10) # 10 minute expiration
    }
token = JWT.encode(payload, ENV[&quot;METABASE_SECRET_KEY&quot;])
@iframe_url = ENV[&quot;METABASE_SITE_URL&quot;] + &quot;/embed/dashboard/&quot; + token + &quot;#bordered=true&amp;titled=true&quot;
</code></pre>
<p>Now in your view, add</p>
<pre><code class="language-html">&lt;iframe
    src=&quot;&lt;%= @iframe_url %&gt;&quot;
    frameborder=&quot;0&quot;
    width=&quot;800&quot;
    height=&quot;600&quot;
    allowtransparency
&gt;&lt;/iframe&gt;
</code></pre>
<p>You are all set. Just restart your application so the new environment variables are taken in consideration. Voilà, your application now has an integrated Metabase dashboard.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to deploy Metabase to make sense of your data</title>
		<link>https://www.clever.cloud/blog/engineering/2019/02/20/how-to-install-metabase/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Wed, 20 Feb 2019 17:28:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[metabase]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2019/02/20/how-to-install-metabase/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/metabase-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="metabase 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/metabase-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><div style="background: #ffffff; padding: 1.5rem; border: 1px solid #deddee; border-radius: 4px; margin: auto auto 2rem auto; max-width: var(--wp--style--global--content-size, 710px);">
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;"><span style="font-size: 2rem;">⚡</span>
<h4 style="margin: 0; color: #333; font-weight: bold;">Update Available</h4>
</div>
<strong>The process has been simplified!</strong> Check out our new Metabase add-on, easy deployment and additional features.
<div class="push-documentation__content"><a class="button --white-border" href="https://www.clever.cloud/developers/doc/addons/metabase/">🚀 Discover Metabase add-on</a></div>
</div>
At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it's not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came upon Metabase.

What is Metabase? In their own words:
<blockquote>The fastest, easiest way to share data and analytics inside your company.</blockquote>
You can configure different questions/queries/visualisations and organize them in dashboard. Take a look at <a href="https://www.metabase.com/docs/latest/getting-started.html">their documentation</a> to grasp the full extend of what you can do.

<a href="https://www.clever.cloud/blog/company/2024/11/07/metabase-on-clever-cloud-easily-query-and-visualize-your-data/">You can now integrate Metabase directly from Clever Cloud.</a>
<h2 id="how-to-deploy-metabase">How to deploy Metabase</h2>
Metabase is written in java and available as a jar you can download and requires a PostgreSQL database. In Clever Cloud terms it means you will need a Java runtime and a PostgreSQL addon. It's dead easy to setup. Here's what you need to do to deploy it:
<pre><code class="language-bash">mkdir metabase # Create a metabase Folder
touch metabase.jar # Create a dummy placeholder file for the jar we will download.
git init # Create the git repository
git add . # Add your files
git commit -m"init" # Create the first commit
clever create --type jar Metabase # Create the java application
clever addon create postgresql-addon --plan m MetabasePG # Create the PostgreSQL instance
clever sevice link-addon MetabasePG # link the addon
clever env set CC_JAR_PATH ./metabase.jar # Configure the jar path
clever env set CC_PRE_BUILD_HOOK 'rm ./metabase.jar &amp;&amp; wget -O metabase.jar http://downloads.metabase.com/v0.33.0/metabase.jar' # make sure you download the latest metabase release
clever env set MB_ENCRYPTION_SECRET_KEY `openssl rand -base64 32` # Generate a random key to encrypt the database configuration
clever env set MB_JETTY_PORT  # Tell Metabase to use the port 8080
clever env set MB_DB_TYPE postgres # Tell Metabase to use Postgres instead of the default H2
# Metabase uses it's own environment variables to configure postgres so you have to copy the one we give you:
clever env set MB_DB_DBNAME dbName
clever env set MB_DB_HOST host
clever env set MB_DB_PASS password
clever env set MB_DB_PORT port
clever env set MB_DB_USER user
clever deploy # Deploy the application
</code></pre>
Now you should see the logs showing up. Once it's over you can type <code>clever open</code> and it will take you straight to your Metabase instance. You should see a wizard to help you create your admin user and connect a first database. If you ave set the <code>MB_ENCRYPTION_SECRET_KEY</code> variable, don't wory the databases credentials you enter in the Metabase will be encrypted.

Now you have a lot of things to do. And there is a lot more you can configure as you will see in their <a href="https://www.metabase.com/docs/latest/administration-guide/start.html">admin guide</a>: Enable Emailing, Slack integration, add new authentication connectors… With that you should be ready to setup and query most of the datasources available to you and produce awesome dahsboards. Happy hacking!]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/metabase-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="metabase 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/metabase-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/metabase-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><div style="background: #ffffff; padding: 1.5rem; border: 1px solid #deddee; border-radius: 4px; margin: auto auto 2rem auto; max-width: var(--wp--style--global--content-size, 710px);">
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;"><span style="font-size: 2rem;">⚡</span>
<h4 style="margin: 0; color: #333; font-weight: bold;">Update Available</h4>
</div>
<strong>The process has been simplified!</strong> Check out our new Metabase add-on, easy deployment and additional features.
<div class="push-documentation__content"><a class="button --white-border" href="https://www.clever.cloud/developers/doc/addons/metabase/">🚀 Discover Metabase add-on</a></div>
</div>
At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it's not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came upon Metabase.

What is Metabase? In their own words:
<blockquote>The fastest, easiest way to share data and analytics inside your company.</blockquote>
You can configure different questions/queries/visualisations and organize them in dashboard. Take a look at <a href="https://www.metabase.com/docs/latest/getting-started.html">their documentation</a> to grasp the full extend of what you can do.

<a href="https://www.clever.cloud/blog/company/2024/11/07/metabase-on-clever-cloud-easily-query-and-visualize-your-data/">You can now integrate Metabase directly from Clever Cloud.</a>
<h2 id="how-to-deploy-metabase">How to deploy Metabase</h2>
Metabase is written in java and available as a jar you can download and requires a PostgreSQL database. In Clever Cloud terms it means you will need a Java runtime and a PostgreSQL addon. It's dead easy to setup. Here's what you need to do to deploy it:
<pre><code class="language-bash">mkdir metabase # Create a metabase Folder
touch metabase.jar # Create a dummy placeholder file for the jar we will download.
git init # Create the git repository
git add . # Add your files
git commit -m"init" # Create the first commit
clever create --type jar Metabase # Create the java application
clever addon create postgresql-addon --plan m MetabasePG # Create the PostgreSQL instance
clever sevice link-addon MetabasePG # link the addon
clever env set CC_JAR_PATH ./metabase.jar # Configure the jar path
clever env set CC_PRE_BUILD_HOOK 'rm ./metabase.jar &amp;&amp; wget -O metabase.jar http://downloads.metabase.com/v0.33.0/metabase.jar' # make sure you download the latest metabase release
clever env set MB_ENCRYPTION_SECRET_KEY `openssl rand -base64 32` # Generate a random key to encrypt the database configuration
clever env set MB_JETTY_PORT  # Tell Metabase to use the port 8080
clever env set MB_DB_TYPE postgres # Tell Metabase to use Postgres instead of the default H2
# Metabase uses it's own environment variables to configure postgres so you have to copy the one we give you:
clever env set MB_DB_DBNAME dbName
clever env set MB_DB_HOST host
clever env set MB_DB_PASS password
clever env set MB_DB_PORT port
clever env set MB_DB_USER user
clever deploy # Deploy the application
</code></pre>
Now you should see the logs showing up. Once it's over you can type <code>clever open</code> and it will take you straight to your Metabase instance. You should see a wizard to help you create your admin user and connect a first database. If you ave set the <code>MB_ENCRYPTION_SECRET_KEY</code> variable, don't wory the databases credentials you enter in the Metabase will be encrypted.

Now you have a lot of things to do. And there is a lot more you can configure as you will see in their <a href="https://www.metabase.com/docs/latest/administration-guide/start.html">admin guide</a>: Enable Emailing, Slack integration, add new authentication connectors… With that you should be ready to setup and query most of the datasources available to you and produce awesome dahsboards. Happy hacking!]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
