Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-5070

Load a local file via the query editor

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Problem Description

      We can use LOAD DATA LOCAL INFILE with the CLI however it looks like this command has been disabled by MaxScale.

      It would be more convenient to have this enable so that we can use the GUI to import CSV or JSON data into the table.

      Design

      The REST-API should expose some endpoint that hooks up to mysql_set_local_infile_handler to which the GUI then streams the data. The data itself doesn't have to contain complete lines and can be (?) just raw chunks of the data.

      One potential method for this would be to use the existing WebSocket mechanism and read the data from there.

      A simpler approach would be to have a normal HTTP POST endpoint to which the data file is uploaded to.

      Attachments

        Activity

          markus makela markus makela added a comment -

          It's hard to give a timeline for new features. If you can describe your use-case well in the issue description and point out if there are other similar use-cases that would benefit from this, I think it'll help with the feature prioritization when new feature are being added.

          markus makela markus makela added a comment - It's hard to give a timeline for new features. If you can describe your use-case well in the issue description and point out if there are other similar use-cases that would benefit from this, I think it'll help with the feature prioritization when new feature are being added.
          wardatJohn John Wardat added a comment -

          Understood, appreciate the explanation. We have been using external tools to convert CSV to SQL and thought it would be convenient to integrate this feature to the GUI. Any insights on the timeline for potential implementation?

          wardatJohn John Wardat added a comment - Understood, appreciate the explanation. We have been using external tools to convert CSV to SQL and thought it would be convenient to integrate this feature to the GUI. Any insights on the timeline for potential implementation?
          markus makela markus makela added a comment -

          LOAD DATA LOCAL INFILE is disabled as it wouldn't load the file from the client server but from the server where MaxScale is located. When the two are on the same server, it works as expected but in all other cases it produces unexpected results. MariaDB currently doesn't have a way to dynamically load large amounts of data that's not SQL apart from the LOAD DATA LOCAL INFILE command or a direct insertion into a table. A separate data upload feature that would behave as if it was a LOAD DATA LOCAL INFILE command is probably simpler to implement in the GUI.

          markus makela markus makela added a comment - LOAD DATA LOCAL INFILE is disabled as it wouldn't load the file from the client server but from the server where MaxScale is located. When the two are on the same server, it works as expected but in all other cases it produces unexpected results. MariaDB currently doesn't have a way to dynamically load large amounts of data that's not SQL apart from the LOAD DATA LOCAL INFILE command or a direct insertion into a table. A separate data upload feature that would behave as if it was a LOAD DATA LOCAL INFILE command is probably simpler to implement in the GUI.

          People

            maxmether Max Mether
            wardatJohn John Wardat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.