Graphql-engine: Integrate with Metabase

Created on 18 Feb 2019  路  10Comments  路  Source: hasura/graphql-engine

Hi guys,
I want integrate Hasura with Metabase for data analytic. Are you any suggestion or guide for me?
I want to set Metabase to use same database with Hasura.
Is it OK?
Let's talk about this feature here.
Thanks.

/CC: @shahidhk, @tirumaraiselvan, @tlrobinson, @kdoh

question

Most helpful comment

AFAIK, these are the variables that Metabase takes as input, and schema is not one of them:

MB_DB_TYPE
MB_DB_DBNAME
MB_DB_PORT
MB_DB_USER
MB_DB_PASS
MB_DB_HOST
JAVA_TIMEZONE

@coco98 @mnlbox

All 10 comments

Sure, this should be straightforward!
Create a metabase instance and point it to postgres and that should be it.

What I meant to say was, for integrating metabase with hasura, you can pretty much ignore hasura and just setup metabase with postgres the way a metabase tutorial would suggest. :)

@coco98 Thanks for your reply.
I now using docker-compose for running Hasura. My question:

  1. Is it better to integrate Metabase in same docker-compose as new container?
  2. Is it better to split Metabase database schema from Hasura? (like Hasura that split own data from user public data through schema level pg_temp_1, pg_toast, pg_toast_temp_1)

I need some suggestion like this.

For 1, I think that's upto you. How are you planning on deploying metabase in production? With docker compose? If that's the case, then you can put it in the same compose file. In fact, for ease of use you can just put everything in the same compose file and later move it to something else later if you need to.

Reg 2, It would be better to get metabase to use a different internal postgres schema for tracking its own state. But I don't know if that is possible? @shahidhk @dsandip Does metabase have a configuration variable to take a postgres schema to store its own state?

AFAIK, these are the variables that Metabase takes as input, and schema is not one of them:

MB_DB_TYPE
MB_DB_DBNAME
MB_DB_PORT
MB_DB_USER
MB_DB_PASS
MB_DB_HOST
JAVA_TIMEZONE

@coco98 @mnlbox

@coco98, @dsandip Guys I'm adding this as a feature request in Metabase repo. Please vote up that related issue if you like this feature too.

@mnlbox We're using Metabase with certain Postgres instances and here is the recommended way to do this:

  1. Create a new database in Postgres for Metabase to store its metadata (set it as MB_DB_NAME)
  2. Create a new user which has access to this database and the database to which Hasura is connected to. (if you're using superuser account for Hasura anyway, use the same user account here also.)
  3. Use this account from metabase to connect to Postgres and you're ready to go!

@shahidhk Why you are suggest separate database rather than separate schema? :thinking:
Can you explain a little?

@mnlbox You can have multiple "databases" inside a single Postgres server/instance. From this:

So the full hierarchy is: server, database, schema, table (or something else instead of a table)

To create a new database that Metabase can use see this

I'm closing this issue. If any of you would like to add something to it, please feel free to re-open it 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

revskill10 picture revskill10  路  3Comments

codepunkt picture codepunkt  路  3Comments

jjangga0214 picture jjangga0214  路  3Comments

lishine picture lishine  路  3Comments

coco98 picture coco98  路  3Comments