-
Notifications
You must be signed in to change notification settings - Fork 18
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Statistics Lithuania as a source #29
Comments
Thanks for the thorough details here, @bertrandmarc. Per point (2), each class Lines 205 to 212 in f19948d
This list can be extended with new items. Per point (3): can you paste the exact URL used for this request? It should be shown in a log message. The SDMX-ML reader does a dump like this when it fails to pick up and incorporate all of the individually parsed items found in the message. Looking at the XML directly should tell us what unusual content is not correctly parsed. |
Ok, thank you I will add a new content_type to fix point 2. About point (3), the url passed to request is http://osp-rs.stat.gov.lt/rest_xml/data/S7R239_M2110211 and the redirected url (from req.url) is https://osp-rs.stat.gov.lt/ords/ipospp/ospp/rest_xml/data/S7R239_M2110211. For your information, this url is parsed without apparent errors by the R package rsdmx: readSDMX(providerId='LSD', resource="data", flowRef='S7R239_M2110211') |
Visiting these in a browser returns the following 400 error: <?xml version="1.0" encoding="UTF-8"?>
<mes:GenericData xmlns:mes="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message" xmlns:com="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common" xmlns:footer="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message/footer" xmlns:g="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/data/generic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message https://osp-rs.stat.gov.lt/xsd_scheme/SDMXMessage.xsd http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common https://osp-rs.stat.gov.lt/xsd_scheme/SDMXCommon.xsd http://www.sdmx.org/resources/sdmxml/schemas/v2_1/data/generic https://osp-rs.stat.gov.lt/xsd_scheme/SDMXDataGeneric.xsd">
<mes:Header>
<mes:ID>2B78DAFFD8AC4140B3AA7DD05591E28C</mes:ID>
<mes:Test>true</mes:Test>
<mes:Prepared>2020-12-01T12:34:49.935000000+02:00</mes:Prepared>
<mes:Sender id="LSD"/>
<mes:Structure structureID="LSD" dimensionAtObservation="AllDimensions">
<com:Structure>
<URN>urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=LSD.LSD(1.0)</URN>
</com:Structure>
</mes:Structure>
</mes:Header>
<footer:Footer>
<footer:Message code="400" severity="Error">
<com:Text xml:lang="lt">Neteisinga parametro Request reikšmė</com:Text>
<com:Text xml:lang="en">Bad parameter Request value</com:Text>
</footer:Message>
</footer:Footer>
</mes:GenericData> Are there any query parameters in the URL? |
Sorry, it was a typo in the urls. I have just fixed it by editing my previous message. |
Great, thanks. So the XML looks, in part, like this: <?xml version="1.0" encoding="UTF-8"?>
<mes:GenericData …>
<mes:Header>
<mes:ID>F7534B25376142ECB32ACB52DEC29020</mes:ID>
<mes:Test>true</mes:Test>
<mes:Prepared>2020-12-01T21:25:24.447000000+02:00</mes:Prepared>
<mes:Sender id="LSD"/>
<mes:Structure structureID="M2110211" dimensionAtObservation="AllDimensions">
<com:Structure>
<URN>urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=LSD.M2110211(1.0)</URN>
</com:Structure>
</mes:Structure>
</mes:Header>
<mes:DataSet structureRef="M2110211">
…
</mes:DataSet>
</mes:GenericData> A wild guess: usually the I will debug further! |
This turned out to be a wrong guess 😅 As mentioned at #33 (comment), the issue is visible in the dump above:
So it's normal for the DataMessage and DSD to be on the stack, but the AttributeValues should not be there. This was because the code did not collect them and attach them to their DataSet. #33 fixed this, so closing. |
It would be nice to be able to have Statistics Lithuania as new source, as in the rsdmx R package. Statistics Lithuania provides SDMX 2.1 and SDMX-json services, well documented. However, there a several issues preventing from using Statistics Lithuania.
In principle, the new source would like (SDMX):
or (JSON):
Please find below the issues preventing the usage of Statistics Lithuania as source in sdmx, with workarounds.
I will try to investigate a bit the issue with the xml endpoint on my own. For the rest I am sorry I am not sure I can of much help, but I'll do my best.
Best,
Bertrand
The text was updated successfully, but these errors were encountered: