Skip to content

Commit

Permalink
Update docs with new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain-S committed Jul 5, 2023
1 parent 3753246 commit 57ed8ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
13 changes: 4 additions & 9 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,16 @@ For the simplest case, we will need `make-tables`, `make-generators`, `create-ta
we need to set environment variables to tell sqlsynthgen how to access our source database (where the real data resides now) and destination database (where the synthetic data will go).
We can do that in the terminal with the `export` keyword, as shown below, or in a file called `.env`.
The source and destination may be on the same database server, as long as the database or schema names differ.
If the source and destination schemas are the default schema for the user on that database, you should not set those variables.
If you are using a DBMS that does not support schemas (e.g. MariaDB), you must not set those variables.

.. code-block:: console
$ export SRC_HOST_NAME='[email protected]'
$ export SRC_USER_NAME='someuser'
$ export SRC_PASSWORD='secretpassword'
$ export SRC_DSN="postgresql://someuser:[email protected]"
$ export SRC_SCHEMA='myschema'
$ export SRC_DB_NAME='source_db'
$ export DST_HOST_NAME='[email protected]'
$ export DST_USER_NAME='someuser'
$ export DST_PASSWORD='secretpassword'
$ export DST_DSN="postgresql://someuser:[email protected]/dst_db"
$ export DST_SCHEMA='myschema'
$ export DST_DB_NAME='destination_db'
Next, we make a SQLAlchemy file that defines the structure of your database using the `make-tables` command:

Expand Down
10 changes: 2 additions & 8 deletions docs/source/tutorials/airbnb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ First, we need to provide SSG with the connection parameters, using a ``.env`` f

.. code-block:: console
SRC_HOST_NAME=localhost
SRC_USER_NAME=postgres
SRC_PASSWORD=password
SRC_DB_NAME=airbnb
DST_HOST_NAME=localhost
DST_USER_NAME=postgres
DST_PASSWORD=password
DST_DB_NAME=dst
SRC_DSN='postgresql://postgres:password@localhost/airbnb'
DST_DSN='postgresql://postgres:password@localhost/dst'
We can start the schema migration process by running the following command::

Expand Down

0 comments on commit 57ed8ce

Please sign in to comment.