Comments (7)
@jerometwell the new table strategy works as expected / described.
from pynonymizer.
Hi! There is already a truncate table strategy, does this work for you?
https://github.com/jerometwell/pynonymizer/blob/master/doc/strategyfiles.md#table-strategy-truncate
from pynonymizer.
If i understand what you're trying to achieve ( cascading delete) then TRUNCATE
won't work anyway.
IIRC truncate isn't suitable for tables with foreign keys.
You'd need a DELETE
statement. Is this a feature you need?
As a workaround, you could add this as a before script:
scripts:
before:
- DELETE FROM table;
from pynonymizer.
@jerometwell yes you are correct, TRUNCATE
doesn't actually work with foreign keys. The before script works, but an official table strategy would be more handy I think.
from pynonymizer.
@TitanNano in this scenario, would you have foreign key checks with CASCADE
enabled? or were you implying that pynonymizer should do discovery also?
I'm just writing documentation and i want to be sure on the use-case.
I've started PR #23 for this issue. If you could take a look at the implementation I'd appreciate a second pair of eyes.
from pynonymizer.
@jerometwell yes CASCADE
is enabled in our scenario. I will have a look at your WIP.
from pynonymizer.
This change has been merged into master
and should go out with v1.13.0
- please test and report back if you can!
from pynonymizer.
Related Issues (20)
- Deprecate python 3.6, add 3.10 tests/support
- Generate random string values to not encounter duplicate entry issues HOT 5
- Default seed_rows value is not in documentation
- Database host, username and password should be optional for MySQL HOT 7
- Is there a way to specify the charset and collation for anonymized dumps in pynonymizer python module ? HOT 1
- MySQL: column strategy "empty" does not working with json columns HOT 2
- Setting to choose amount of Seed Data (more Fake Data) HOT 2
- Pynonymizer overwrites my original database from dump HOT 1
- "Duplicate entry for key error" during anonymization / How to show executed SQL statement? HOT 2
- Wrong documentation
- Broken Pipeline on project HOT 3
- Fix Linting HOT 1
- Mysql - RESTORE_DB not working with remote host. HOT 5
- Unable to complete execution of default process control HOT 3
- What does GET_SOURCE step do and is there a way/step to just test if pynonymizer can connect to the mysql server HOT 2
- Generate default strategy file to manage changing database schemas and not fail due to schema changes HOT 4
- Broken pipe when using large dump files HOT 3
- Change/Ignore exception handling during anonymization HOT 2
- Anonymizer process control does not work HOT 7
- anyway to escape : from yaml file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pynonymizer.