Series replication#

Federation (the [sources] mechanism, see Securing the Refinery) reads remote series live, on every request. Replication is the pull alternative: two rework tasks copy series from a remote refinery — revision history included — into the local instance, where they become ordinary primary series.

replicate_series_from_refinery#

Replicates a single series. Its inputs:

  • url_refinery_origin — the http uri of the origin instance;

  • seriesname_origin — the series to replicate;

  • seriesname_target — the local name (defaults to the origin name);

  • from_insertion_date — where to start in the origin revision history (optional; a moment expression);

  • insertion_freq_offset — thin the replicated history to at most one revision per given pandas offset (e.g. D), when the origin history is denser than needed (optional).

The task is incremental: a re-run only fetches the revisions newer than the last replicated one. Scheduling it hence keeps the local copy current.

The origin metadata is copied over as well, replacing whatever the local copy carried: metadata edited on the copy does not survive the next run.

replicate_from_basket#

The same, for every series yielded by a basket of the origin instance:

  • url_refinery_origin and basket_name select the series;

  • prefix / suffix decorate the local names, to give the copies a namespace of their own;

  • from_insertion_date and insertion_freq_offset behave as above.

Both tasks run in the timeseries domain and can be launched or scheduled from the tasks board like any other task (see To the next level).