Skip to content

NEM-388 Implement sampling scope feature#137

Open
Mateus-Cordeiro wants to merge 1 commit intomainfrom
NEM-388-sampling-scope
Open

NEM-388 Implement sampling scope feature#137
Mateus-Cordeiro wants to merge 1 commit intomainfrom
NEM-388-sampling-scope

Conversation

@Mateus-Cordeiro
Copy link
Collaborator

This PR adds a sampling scope configuration to control which tables are eligible for row sampling during database introspection.

Changes

  • Added sampling yaml configuration
  • Introduced SamplingScope models
    • include rules (allowlist)
    • exclude rules (denylist)
    • except_schemas and except_tables for exclude-rule exceptions (e.g exclude all tables in a schema except one)
  • Implemented SamplingScopeMatcher to apply scope rules
  • Integrated sampling filtering into the base_introspector before obtaining the samples

Configuration details

sampling supports:

  • enabled master switch (default: true)
  • Glob matching:
    • *, ?, [seq], [!seq]
  • Rule behaviour detailed in sampling-scope.md file

Notes

This PR does not introduce a possibility to exclude specific columns from sampling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant