Skip to content

Conversation

@androna-xm
Copy link

Description

This PR exposes the APOC sample parameter used in schema discovery so that users can control sampling when calling get_structured_schema and get_schema.

  • Add an optional sample parameter to get_structured_schema and get_schema.
  • Thread the sample value through to the apoc.meta.data calls (via {sample: $SAMPLE}).
  • Keep current behaviour by default (sample=1000).
  • Allow sample=-1 to disable sampling and perform a full scan.

This addresses the improvement requested in #350.

Type of Change

  • [x ] New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

Small, localized change in schema.py that adds a parameter and passes it through to existing APOC procedures without altering the rest of the API surface.

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • [ x] Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • [x ] Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • [ x] CLA (https://neo4j.com/developer/cla/) has been signed
  • [x ] CHANGELOG.md updated if appropriate

@androna-xm androna-xm requested a review from a team as a code owner December 6, 2025 17:37
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