Skip to content

Handle Eurostat async ZIP responses (footer URL polling) #40

@aborruso

Description

@aborruso

Problem

Eurostat's SDMX API sometimes returns an empty data message with a download URL in the response footer instead of the actual data. This happens for large datasets that are served asynchronously as ZIP archives.

Currently opensdmx does not handle this case: the user receives an empty response with no explanation.

Expected behaviour

When Eurostat returns a footer URL, opensdmx should:

  1. Detect the footer URL in the response
  2. Poll the URL until the file is ready (with configurable retry delay and max attempts)
  3. Download and extract the ZIP
  4. Return the data as if it had been a normal synchronous response

Reference

khaeru/sdmx handles this in sdmx/source/estat.py via a finish_message() hook that polls the footer URL with configurable retry delay and max attempts.

Notes

  • Affects large Eurostat datasets only — standard requests are unaffected
  • The polling logic should be transparent to the caller
  • Retry parameters (delay, max attempts) could be exposed as provider-level config in portals.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions