digilist / SnakeDumper

Anonymize your database dumps.
MIT License
49 stars 27 forks source link

Missing documentation #3

Closed FrankGiesecke closed 6 years ago

FrankGiesecke commented 6 years ago

Dear @digilist,

the README contains a hint to the documentation to find out which options are available. Sadly to say, that the link result in an 404 😢

Please, could you provide the documentation?

THX

digilist commented 6 years ago

Good catch. I think I was a little to motivated when I published this tool. Unfortunately there is no documentation yet.

FrankGiesecke commented 6 years ago

Oh, sadly to read this. I've extracted the necessary information for me by reading the code.

The tool works great. So a documentation of the available options/params in the configuration YAML would help to consume it.

FrankGiesecke commented 6 years ago

It would be a good step to get a documentation for the available converters and filters. How can they be used?

digilist commented 6 years ago

Yes, that's true. I'll try to find some time do write some documentation.

FrankGiesecke commented 6 years ago

That would be great.

Can you shortly explain how to deal with the filters?

digilist commented 6 years ago

Yes. If you want - for example - include only customers from a specific country, you can define a filter like this:

tables:
    customers:
        filters:
            - ['eq', 'locale', 'de_DE']

You can find a list of all available operators here: https://github.com/digilist/SnakeDumper/blob/master/src/Configuration/Table/Filter/DefaultFilter.php

You can find another example with like and in in the demo.yml

FrankGiesecke commented 6 years ago

Thank for this.

Can you describe how to use the the depends filter? What is it god for? Have I use it, if tables are referenced to others? Or is it optional?

digilist commented 6 years ago

It's used internally to describe a dependency between tables. This is necessary, if you filter a database and want to skip the related entities (e.g. only last 100 customers, then you do not want to dump all billings, but only of those of customers included in the dump). I think there is no need to add it manually, this happens automatically (at least right now I cannot remember a reason to use it in the config, I don't know why I added it).

digilist commented 6 years ago

I started writing some documentation (#7). It'd great to hear from you what you think about it :smiley:

It's not a detailed explanation of all converters yet, but I think it's a start :smile: