Creating/Connecting Materialized View with Metabase

Hi Flamber/Metabase,

I would like to know how do I achieve either one of the following:

  1. If let's say we build a materialized view via AWS/Redshift, how do we send back the materialized view as a source in Metabase or at least to enable Metabase to communicate with that materialized view?

  2. Or if let's say we build a materialized view in Metabase itself, how do we create the user with readOnly=false so that to allow this user to be able to write and create new temp tables using the MATERIALIZED VIEW or INDEX?

This is because I was facing these 2 errors as I tried to test the MATERIALIZED VIEW and INDEX function.

CREATE MATERIALIZED VIEW tribute_participants
AS (SELECT * FROM tribute_video)
LIMIT 100

CREATE INDEX tribute_participants ON tribute_video (tribute_id)
LIMIT 100

Metabase does not allow you to write to the DB (yet). You have to create the MV either via a data orchestration platform and then tell Metabase to resync the DB so it finds the MV and displays it as a table.

Hi Luiggi,

What kind of data orchestration platform would you recommend?

I found some Metabase users who used Dremio and leveraged their Data Reflection feature to create Materialized View from AWS RedShift raw tables before sending it to Metabase.

The only thing that I'm wondering is the setup of linking that Materialized View (table) data to Metabase, do I then create a new database source like this in Metabase to grab that Materialized View from Dremio/data orchestration platform:

Or is there a way to let Metabase communicate with that data orchestration platfrom from the Metabase Native SQL Query Editor itself?

The orchestrators can be as simple as a python script firing every X minutes/hours/days to something more elaborated like Airflow/Prefect

Greetings,
I wonder how to connect a ready-made view / materialized view with Metabase.
I've re-synced my Postgres DB but no views are shown up in data model schema, only tables.
I've also checked with Database connection menu, but no settings regarding views are there either.
Could you please advise how to connect a view and use it as a table in Metabase?

@alexpti4ka Have a look here: https://www.metabase.com/docs/latest/troubleshooting-guide/cant-see-tables
Make a query from within Metabase > New > SQL Query > select * from your_view
You are likely lacking the correct privileges.

Thank you, I found it. Indeed it was among the other tables in one of the data schemas.
Happy New Year :evergreen_tree: