-
Install requirements in a virtual environment.
python -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Create a
.env
file to connect to Materialize. Here is an example:export MZ_HOST=<id>.<region>.aws.materialize.cloud export [email protected] export MZ_PASSWORD=<app password> export MZ_PORT=6875 export MZ_DB=materialize export MZ_CLUSTER=chuck export MZ_SCHEMA=public export MZ_TRANSACTION_ISOLATION=serializable
-
Create a table in Materialize (e.g. from the Console SQL Shell).
create table t (id int, content text); insert into t values (1, 'hi'), (2, 'hello');
-
Run the application.
python app.py
Output:
ID: 1 Content: 'hi' ID: 2 Content: 'hello'
-
Notifications
You must be signed in to change notification settings - Fork 0
Simple example for connecting SQL Alachemy to Materialize
License
chuck-alt-delete/mz-sqlalchemy-example
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple example for connecting SQL Alachemy to Materialize
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published