Skip to content
ParticleDB
Release candidateParticleDB 1.1.19-rc.17 is not yet GA or ready for production data.Release status →

Particle best practices

Pass the values a function needs as arguments. Prefer a deterministic transformation that returns the same result for the same inputs. Use SQL to select and join records before applying the function.

Avoid depending on invocation count or row order. External calls and side effects need their own authorization and idempotency design. See runtime and trust.

Choose descriptive names that do not conflict with SQL built-ins. Update callers when changing a name or signature. See names and errors.

Annotate every argument and return value. Test the SQL values your application will pass, including NULLs and boundary values. Validate supported mappings with the Python guide.

Unit-test the ordinary function, then call the loaded function through SQL. Check returned values and errors, rather than treating successful registration as proof that the implementation works. Follow testing.

Pin the module’s dependencies and use the same environment in testing and deployment. Keep a working module available for rollback. Test startup loading and a restart before depending on the function in application queries.

Load and deploy Particles · Availability and limits