-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters