GitHub
07/15/2025, 2:55 AMdecimal setting kind to support numeric values with decimal precision. This enables plugin developers to handle values like Unix timestamps with fractional seconds
(e.g., 1640995200.123) that don't fit the existing integer or string types.
Implementation:
• Adds DECIMAL to the SettingKind enum
• Implements casting logic using Python's decimal.Decimal for precise arithmetic
• Adds automatic type inference for both Decimal and float values
• Updates JSON schema validation to accept decimal as a valid setting kind
• Includes comprehensive test coverage for edge cases like scientific notation and precision handling
The new setting type follows the same patterns as existing types and integrates seamlessly with Meltano's configuration system.
## Help!
This is my first Meltano PR so please let me know if I've missed anything. 🙏🏾 Thank you!
## Related Issues
• Closes #3424
## Summary by Sourcery
Add support for a new decimal setting kind to handle numeric values with fractional precision in Meltano configurations.
New Features:
• Introduce DECIMAL to SettingKind with casting logic using Python's decimal.Decimal
• Enable automatic kind inference from Decimal and float values
• Update JSON schema validation to accept decimal as a valid setting kind
• Extend stringify_value to handle decimal settings as strings
Tests:
• Add tests for casting decimal strings (including scientific notation and invalid formats)
• Add tests for non-string decimal values passing through unchanged
• Add tests for automatic decimal type inference from Decimal and float inputs
• Add tests for correct stringification and round-trip casting of decimal values
meltano/meltanoGitHub
07/16/2025, 3:26 AM