ETL

Create and stage a plan

Changed on

Validates the plan, creates it with status staged and stages its data for the tenant's next ETL run; the data appears in the ClickHouse table plan_<sanitized>_<hash8> (see name) only after that run has completed, and the plan's status becomes loaded (or failed if it is still not loaded 36 hours after its creation). Entries are flat objects named after GenericPlanColumn (see GET /etl/v1/plans/schema for the field list, formats and rules). Per entry: exactly one time field (timeDate YYYY-MM-DD, timeDateYearWeek YYYY-WW, timeDateYearMonth YYYY-MM, timeDateYearQuarter YYYY-Q, timeDateYear/timeFiscalYear YYYY), at least one measure, no nulls. The ETL spreads every entry evenly over the days of its period (each measure divided by the number of days). taxRate defaults to 1.0 and only derives the plannedXInclTax columns. "" in channelKey or employeeKey (as the only key of organisationKey/channelKey/employeeKey/country) is a default entry expanded to all remaining channels resp. employees; "" in organisationKey or country is not expanded and the entry is dropped. customerNumber and warehouseKey are looked up and become null when unknown. Plan names are unique per tenant; the name of a deleted plan can be used again once the deletion is complete. displayName and description can be changed later, the entries cannot: delete the plan and create it again. Each plan table only has the columns that are non-null and non-zero in at least one row. Fields the ETL accepts but never stores are reported under warnings.

post/etl/v1/plans

Request

  • Base URL
    https://api.minubo.com
  • Auth
    • HTTP bearer
    • or HTTP bearer

Request body

namestring

Unique plan name per tenant, the plan's key; trimmed, then must match [\p{L}\p{N} .-]+ and must not be "schema". The data is loaded into the ClickHouse table plan<sanitized><hash8>: every character outside [0-9a-zA-Z] of the name becomes "" (prefixed with "" if it starts with a digit), hash8 is the first 8 hex characters of the SHA-256 of the name. A second POST with a name the tenant already has (in any status) is rejected with 409 plan_already_exists; the name is free again once the plan is deleted.

displayNamestring

Optional display name, at most 255 characters; can be changed later with PATCH.

descriptionstring

Optional description of the plan, at most 10000 characters; can be changed later with PATCH.

Example request

{
  "name": "Budget 2027",
  "displayName": "Budget 2027 (final)"
}

Response

Plan staged; warnings lists non-fatal findings (dropped fields, missing taxRate)

entryCountinteger required

Number of staged entries (before the per-day split).

warningsstring[] required

Example response

{
  "plan": {
    "startDate": "2027-01-01",
    "endDate": "2027-12-31"
  }
}

Changes

    • breaking

      removed the required property name from the response with the status

    • breaking

      removed the required property name from the response with the status

    • breaking

      removed the required property name from the response with the status

    7 more changes in this revision