
Warn when previous Form versions hold fields missing from the current one.
Source:R/odata_submission_get.R
warn_on_schema_drift.RdUsage
warn_on_schema_drift(
current_schema,
pid = get_default_pid(),
fid = get_default_fid(),
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
odkc_version = get_default_odkc_version(),
retries = get_retries()
)Arguments
- current_schema
The current form schema as returned by
form_schema.- pid
The numeric ID of the project, e.g.: 2.
Default:
get_default_pid.Set default
pidthroughru_setup(pid="...").See
vignette("Setup", package = "ruODK").- fid
The alphanumeric form ID, e.g. "build_Spotlighting-0-8_1559885147".
Default:
get_default_fid.Set default
fidthroughru_setup(fid="...").See
vignette("Setup", package = "ruODK").- url
The ODK Central base URL without trailing slash.
Default:
get_default_url.Set default
urlthroughru_setup(url="...").See
vignette("Setup", package = "ruODK").- un
The ODK Central username (an email address). Default:
get_default_un. Set defaultunthroughru_setup(un="..."). Seevignette("Setup", package = "ruODK").- pw
The ODK Central password. Default:
get_default_pw. Set defaultpwthroughru_setup(pw="..."). Seevignette("Setup", package = "ruODK").- odkc_version
The ODK Central version as a semantic version string (year.minor.patch), e.g. "2023.5.1". The version is shown on ODK Central's version page
/version.txt. Discard the "v".ruODKuses this parameter to adjust for breaking changes in ODK Central.Default:
get_default_odkc_versionor "2023.5.1" if unset.Set default
get_default_odkc_versionthroughru_setup(odkc_version="2023.5.1").See
vignette("Setup", package = "ruODK").- retries
The number of attempts to retrieve a web resource.
This parameter is given to
RETRY(times = retries).Default: 3.
Details
Central's OData feed uses only the current Form definition: fields that a
previous published version held at another path (removed, renamed, or
moved to another group or repeat) do not appear in the download, while the
stored Submission XML keeps their values.
This helper compares the paths of every published Form version against the
current schema and warns about paths that have no current equivalent.
To include fields from all versions, use submission_export
with deleted_fields = TRUE.
Failures while listing versions or reading a version schema are ignored: the check must never break a download.
The warning is unconditional: it is not gated by verbose, as lost
values must never pass silently.
See also
Other odata-api:
odata_metadata_get(),
odata_service_get(),
odata_submission_get()