- Updated the nutrition import logic to utilize a new row processing specification, improving data aggregation and validation. - Refactored the template rendering process in the workflow executor to use Jinja2's Environment with ChainableUndefined for better handling of missing attributes. - Added backward-compatible shortcuts for accessing decision signals in node contexts, enhancing flexibility in template usage. - Introduced import row processing options in CSV templates, allowing for more customizable data handling during imports.
8 lines
370 B
SQL
8 lines
370 B
SQL
-- Migration 047: CSV-Vorlagen — optionale Zeilenaggregation (group_by + aggregates) vor DB-Schreiben
|
|
|
|
ALTER TABLE csv_field_mappings
|
|
ADD COLUMN IF NOT EXISTS import_row_processing JSONB;
|
|
|
|
COMMENT ON COLUMN csv_field_mappings.import_row_processing IS
|
|
'Optional: { "group_by": ["date"], "aggregates": { "kcal": "sum" } } — siehe csv_parser/import_row_processing.py';
|