edyan / neuralyzer Goto Github PK
View Code? Open in Web Editor NEWNeuralyzer is a library and a command line tool to anonymize databases (by updating existing data or populating a table with fake data)
License: GNU General Public License v2.0
Neuralyzer is a library and a command line tool to anonymize databases (by updating existing data or populating a table with fake data)
License: GNU General Public License v2.0
The guesser takes the size of the int to generate the value. Nevertheless the size does not mean anything. Example : INT(50) does not mean that we can have a bigger number than 4 or 8 billions.
What are the requirements to run this? I tried under jessie and stretch. Both failed:
Jessie:
root@98cc125a347e:/usr/src/app# php --version
PHP 5.6.38-0+deb8u1 (cli) (built: Sep 20 2018 02:32:02)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
root@98cc125a347e:/usr/src/app# neuralyzer
PHP Fatal error: Default value for parameters with a class type hint can only be NULL in phar:///usr/local/bin/neuralyzer/vendor/symfony/console/Application.php on line 85
Stretch:
root@0c1488d9854c:/usr/local/bin# php --version
PHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies
root@0c1488d9854c:/usr/local/bin# neuralyzer
PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in phar:///usr/local/bin/neuralyzer/vendor/symfony/console/Output/Output.php on line 40
If MySQL is in strict mode, some queries crash because they are trying to enter a bigger value than what is allowed (example : VARCHAR(80)
and { method: sentence, params: [8] }
).
Before running the query, truncate each value with the field info
I am trying to generateConfFromDB
and it looks like Doctrine is dying on the bit type column
Stack trace below with a few fields stared out
bob@bob:~/neuralyzer$ php test.php
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Unknown database type bit requested, Doctrine\DBAL\Platforms\PostgreSQL92Platform may not support it. in /home/bob/neuralyzer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:461
Stack trace:
#0 /home/bob/neuralyzer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php(370): Doctrine\DBAL\Platforms\AbstractPlatform->getDoctrineTypeMapping('bit')
#1 /home/bob/neuralyzer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(831): Doctrine\DBAL\Schema\PostgreSqlSchemaManager->_getPortableTableColumnDefinition(Array)
#2 /home/bob/neuralyzer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(186): Doctrine\DBAL\Schema\AbstractSchemaManager->_getPortableTableColumnList('****', '******', Array)
#3 /home/bob/neuralyzer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(292): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableColumns('****')
#4 /home/bob/neuralyzer/vendor/doctri in /home/bob/neuralyzer/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php on line 461
Hello,
I'm using neuralizer to anonymize a DB that shall be use for debuging.
One specific of our DB is that we have to tables, lets say users
and families
, with a users being part of families.
Both have a last name: usually, Marie Dupond is maried with Jean Dupond, and both are in the same family Dupond. Sometimes there are inconsistencies (divorces, etc...), but that's the idea.
We wondered if there would be a way to use Faker to consistently replace a lastname with another, faked, so that all Dupond would be replaced by the same faked last name...? (in order to keep as much as possible of the relative consistency)
Hello Emmanuel,
Thanks for this tool. I'm having difficulties to use config:generate because of enums in our DB:
In AbstractPlatform.php line 454:
Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.
Am I doing something wrong?
Thanks !
Hello, I tried to generate a config file with config:generate
but I got this error:
In AbstractPlatform.php line 454:
Unknown database type _int4 requested, Doctrine\DBAL\Platforms\PostgreSQL100Platform may not support it.
As you can see, _int4
is not recognized as a valid column type. In Symfony you can fix this configuring mapping_types
.
# config/packages/doctrine.yaml
doctrine:
dbal:
mapping_types:
_int4: string
Does neuralizer have something like this? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.