{% extends "flask_deck/base.html" %} {% block breadcrumbs %} / {{ view.plural_label }} / Dry-Run Import {% endblock %} {% block content %}

Import {{ view.plural_label }}

Every upload is validated inside a guaranteed-rollback SQLAlchemy SAVEPOINT before commit.

{{ deck_icon("arrow-left", 13) }} Back to {{ view.plural_label }}
{% if error_msg %} {% endif %}

Step 1 · Upload CSV or JSON for Dry-Run Diff

Max {{ config.max_import_rows }} rows · {{ config.max_upload_bytes // (1024 * 1024) }} MiB
{% if report %}
Creates (+INSERT)
{{ report.creates }}
Updates (~DIFF)
{{ report.updates }}
Unchanged (=SKIP)
{{ report.unchanged }}
Validation Errors
{{ report.errors }}

Step 2 · Savepoint Diff Preview ({{ report.filename }})

Mapped columns: {{ report.mapped_columns | length }} · Zero changes written to DB yet

{% if report.applicable_count > 0 %}
{% if report.errors > 0 %} {% endif %}
{% endif %}
{% for row in report.rows[:200] %} {% endfor %}
Row Action Key Field-Level Diff / Diagnostics
#{{ row.row_number }} {% if row.status == 'create' %} + INSERT {% elif row.status == 'update' %} ~ UPDATE {% elif row.status == 'error' %} ! ERROR {% else %} = UNCHANGED {% endif %} {{ row.key_display }} {% if row.errors %}
{{ row.errors | join(" · ") }}
{% elif row.changes %}
{% for fname, pair in row.changes.items() %}
{{ fname }}: {% if pair[0] is not none %}{{ pair[0] }}→{% endif %} {{ pair[1] }}
{% endfor %}
{% else %} Identical to existing record {% endif %}
{% endif %}
{% endblock %}