nixys / nxs-data-anonymizer

A tool for anonymizing PostgreSQL and MySQL databases' dump
Apache License 2.0
233 stars 10 forks source link

added option to skip template if column value is NULL #10

Closed akademic closed 1 year ago

akademic commented 1 year ago

Suggest option autonull

filters:
  my_table:
    columns:
      last_name:
        value: "{{- randAlphaNum 20 | nospace -}}"
        autonull: true

if autonull is true than if column has NULL value do not transform it with templates

Pitfalls: if NULL value has whitespace before it will not be null, but it will be correct quoted string. But it is parser issue.

akademic commented 1 year ago

not actual any more