demos icon indicating copy to clipboard operation
demos copied to clipboard

Create a schema.sql shortcut file

Open ruf-io opened this issue 2 years ago • 5 comments

Sometimes I want to just create all the sources, views, matviews right away.

I think it'd be nice to standardize by creating a schema.sql file for each demo that lets you do that.

A couple open questions:

  1. Does this create some annoying SQL duplication issues between readme and file?
  2. Is there a way to execute a SQL file through the provided docker containerized CLI? (so users dont need psql installed)

ruf-io avatar Apr 27 '22 11:04 ruf-io

That's a great idea!

Is there a way to execute a SQL file through the provided docker containerized CLI? (so users dont need psql installed)

You can boot Materialize using a .sql script and mzcli (see this example). So, we should be able to just provide the docker run command that does this if folks want to get everything created for them.

morsapaes avatar Apr 27 '22 11:04 morsapaes

Ah, we'll want to test this through, since there might be an issue with this method: https://materializecommunity.slack.com/archives/C015KDVS7EV/p1650629278433099

morsapaes avatar Apr 27 '22 12:04 morsapaes

Turns out the issue above was related to misconfigured healthchecks!

morsapaes avatar May 02 '22 13:05 morsapaes

Maybe closing this PR and reworking this to use the new dbt init feature that @dehume worked on?

bobbyiliev avatar Oct 17 '23 13:10 bobbyiliev

Maybe closing this PR and reworking this to use the new dbt init feature that @dehume worked on?

If you still want to the demo to use the red panda infrastructure, it won't really line up with the dbt init. The dbt init is much more self contained and just uses load generators.

dehume avatar Oct 17 '23 13:10 dehume