Skip to content
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 read_sdmx convenience method #156

Open
javihern98 opened this issue Dec 18, 2024 · 4 comments · May be fixed by #172
Open

Add read_sdmx convenience method #156

javihern98 opened this issue Dec 18, 2024 · 4 comments · May be fixed by #172
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@javihern98
Copy link
Contributor

javihern98 commented Dec 18, 2024

Add the read_sdmx method:

  • Supports all readers implemented in io package
  • Uses the input processor to use a file path or string buffer or URL
  • Infers the format to use from an enumeration that holds the supported formats
@javihern98 javihern98 self-assigned this Dec 18, 2024
@javihern98 javihern98 added the enhancement New feature or request label Dec 18, 2024
@javihern98 javihern98 linked a pull request Dec 18, 2024 that will close this issue
@javihern98 javihern98 modified the milestone: 1.0 Dec 19, 2024
@javihern98 javihern98 assigned mla2001 and unassigned mla2001 Dec 23, 2024
@antonio-olleros
Copy link

As an example of the method

def get_dataset(data_path:str|Path, metadata_path:str|Path=None, data_format=Pd) -> "DataSet":
    #Get files format
        1. is_xml, is_csv, is_json
        2. Version
    #Validate files
        1. Can I parse de file with what I got in 1 and 2?
    
    if metadata_path:
        string_metadata, _ = process_string_to_read(metadata_path)
        metadata = read_xml(string_metadata, validate=False)

    

    string_data, _ = process_string_to_read(data_path)
    data = read_xml(string_data, validate=False)

    data.structure = metadata

    return data

@javihern98
Copy link
Contributor Author

javihern98 commented Jan 9, 2025

@sosna Need some guidance on the current status of SDMX-JSON and FusionJSON reading:

  • Are SDMX-JSON data readers implemented?
  • Could you provide a small script to read these files and parse the structures?

@sosna
Copy link
Collaborator

sosna commented Jan 10, 2025

Are SDMX-JSON data readers implemented?

No, we have JSON readers to support the FMR use case, i.e. reading structural and reference metadata. Coming with generic readers and writers going beyond that use case is scheduled for later this year (it's on my workplan already).

@javihern98
Copy link
Contributor Author

Are SDMX-JSON data readers implemented?

No, we have JSON readers to support the FMR use case, i.e. reading structural and reference metadata. Coming with generic readers and writers going beyond that use case is scheduled for later this year (it's on my workplan already).

I will leave them as NotImplemented in the read_sdmx method then, testing it accordingly

@javihern98 javihern98 linked a pull request Jan 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants