Skip to content

scrub database dump: implement Heroku client and postgres client (2/3) - #224

Open
odo-sfct wants to merge 2 commits into
ow/scrub-scriptfrom
ow/scrub-script-heroku-cli
Open

scrub database dump: implement Heroku client and postgres client (2/3)#224
odo-sfct wants to merge 2 commits into
ow/scrub-scriptfrom
ow/scrub-script-heroku-cli

Conversation

@odo-sfct

@odo-sfct odo-sfct commented Jun 9, 2024

Copy link
Copy Markdown
Contributor

Part 1 | Part 2 | Part 3

  • Builds a Heroku client for a python script to call heroku cli with subprocess.
    Opted for writing in python over a shell script for error handling and integration with Django's base commands which can take care of connecting to the ORM + maintainability of python over shell scripts.

The heroku client can in the future be expanded to use the API or other CLI tools for other downstream scripts.

  • Builds a Postgres client mainly for scrubbing using the psql.
    Implementation creates a temporary database so that the process is "transactional" in nature. There won't be partial state, or PII getting into the target device unless the full process is successful.

It was much easier to leverage Djangos ORM and faker library if built in python over a shell script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant