The simple answer to that is maybe not to use a materialized view :
- You may create a SQL query recipe containing your complex join query and its output will be a table filled with the data corresponding to that query. The output will be very similar to what you have in mind because it materializes in a table your query. Rerunning the flow will update that table.
If for some optimisation reason you still want to use a materialized view, you can do the following :
- create your materialized view in a SQL notebook
- create a SQL dataset based on this materialized view by manually entering its name in the table field.
- create a SQL script recipe with your refresh statement. The inputs of this recipe are the tables used in the join query, the output dataset is the one pointing to the materialized view you created at step 2.