Polypheny-DB icon indicating copy to clipboard operation
Polypheny-DB copied to clipboard

JSON & XML Sources

Open TobiasHafner opened this issue 6 months ago • 0 comments

This pull request introduces the new JSON and XML adapters for Polypheny, enabling the inclusion of JSON and XML files as data sources that can be queried. The adapters support various methods of providing files or directories, including linking, uploading, or fetching by URL.

Supported Features and Combinations

  1. URL:

    • Single File: Fully functional and tested. Users can provide a URL pointing to a specific JSON or XML file, which will be fetched and included as a source. This feature was tested for large files streamed from a server (up to 48GB). Streams are processed in a way preventing excessive materialization on the server side.
  2. Link:

    • Directory: Fully functional and tested. Users can link to a directory containing multiple JSON or XML files. The adapter will include all files under a common namespace.
    • Single File: Fully functional and tested. Users can link directly to a single file.
  3. Upload:

    • Directory / Single File: This feature is currently experiencing issues due to conflicts with the Crud class and the Security Manager. Namely only one file can be uploaded as the second one to be uploaded fails.

Dependencies

  • The adapters utilize SAX for XML processing (included in Java by default) and Jackson for JSON processing, ensuring efficient handling of potentially large files without overwhelming system memory.

Known Issues

  • Upload Functionality: The upload feature for both directories and single files is currently not operational due to issues with the SecurityManager and the Crud class.

Future Improvements

  • Resolving the upload functionality issues to enable secure and efficient file uploads.

TobiasHafner avatar Aug 05 '24 19:08 TobiasHafner