-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from yankeexe/data-transfer-pg
Generate and transfer 10000 data postgres
- Loading branch information
Showing
5 changed files
with
41 additions
and
25 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 |
---|---|---|
|
@@ -5,4 +5,6 @@ WORKDIR /app | |
# Copy code to container | ||
COPY . . | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
CMD ["python", "main.py"] |
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
faker==2.0.4 |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
-- Create table for fruits data (destination database). | ||
CREATE TABLE fruits (id INT, name VARCHAR(50), quantity INT); | ||
-- Create table for users data (destination database). | ||
CREATE TABLE users (id INT, name VARCHAR(50), city VARCHAR(50)); |
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 |
---|---|---|
@@ -1,7 +1,2 @@ | ||
-- Create table for fruits data (source database). | ||
CREATE TABLE fruits (id INT, name VARCHAR(50), quantity INT); | ||
|
||
-- Insert data into fruits table | ||
INSERT INTO fruits VALUES (1, 'Banana', 150); | ||
INSERT INTO fruits VALUES (2, 'Orange', 64); | ||
INSERT INTO fruits VALUES (3, 'Apple', 35); | ||
-- Create table for users data (source database). | ||
CREATE TABLE users (id INT, name VARCHAR(50), city VARCHAR(50)); |