Subsetter

Latest version: v0.3.0

Safety actively analyzes 627763 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

- Added support for remapping schema and table names in sampling phase
- Patch support for JSON data types
- Improve live database testing
- Replaced a lot of custom dialect handling with sqlalchemy core api
- Plan output no longer outputs if tables should be materialized. Sampler now
calculates if it needs to materialize a table itself.
- Fixed significant bug in solver that prevented finding a valid plan in many
scenarios. Now planning will only fail if there is a forward cycle of foreign
keys.
- Added support in mysql dialects for sampling across multiple foreign keys to
the same table. Previously this would result in an error due to attempting to
reopen a temporary table which is not supported in mysql.
- Ordering of tables in the produced plan no longer matters

0.2.0

Added postgres support alongside the existing mysql support. To install needed
dialect pacakages install either `subsetter[mysql]` or `subsetter[postgres]`
depending on your needs. Supports subsetting across dialects as well.

Added new plan config option `normalize_foreign_keys` disabled by default. The
old behavior was equivalant to this being enabled but I felt this behavior may
be a bit surprising to be enabled by default. See documentation in
[planner_config.example.yaml](planner_config.example.yaml) for what this flag
does.

Plan output format has significantly changed. Instead of outputting SQL it now
outputs a syntax tree that then can be formed back into appropriate SQL
depending on the destination dialect. You can use the `--sql` flag to have the
planner output a plan that includes raw SQL instead to get back to something
closer to the old behavior. This will break cross-dialect sampling, however.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.