1. Home
  2. Docs
  3. Data Explorer
  4. Import CSV and SQL files

Import CSV and SQL files

Import CSV file

  1. Upload CSV file
  2. Perform column mapping
  3. Import CSV file

Use reload to import an updated CSV file and prevent the need to remap table columns!

Import SQL or ZIP file from Data Explorer main page

SQL files imported from the Data Explorer main page may contain any SQL statement. Make sure to end every SQL statement with a ; character and a new line. Multiple SQL files can be packed together in a ZIP file, allowing to import larger files. You must have ZipArchive installed to import ZIP files!

Click the Import data/Execute script(s) button at the top of the screen. Select the file you want to import and click Import file/Execute script(s).

Import SQL file from Data Explorer table page

Use this feature to export/import a selected number of rows from a specific table. The import feature on a Data Explorer table page only supports the import of data into the table displayed on the page. Any other statement than an insert into the table on the page will be rejected.

Click the Import button on top of the screen. Select the file you to import and click Import File.

Was this article helpful to you? Yes 1 No

23 Replies to “Import CSV and SQL files”

  1. sir
    in every tutorial or post the data base is bitnomi_wordpress but the plugin i cant see such database in my case. is it making any issue in future or not… what shuould i select , mysql , information schema or the other one

    1. Hi Idrees,

      The bitnami_wordpress database in the video tutorials is the database where the WordPress tables are installed. You can safely select your own WordPress database.

      Sorry for not mentioning this in the tutorials! I should have explained this. Thank you for your feedback!

      Best regards,

  2. Hi Peter,

    Is there any way to implement on a WordPress page a button to allow visitors to export table data?


    Best regards.

    1. Hi Javier,

      There are two ways to do this:
      (1) Create a Data Project for your table and add your table to a web page with shortcode wpdadiehard. An export button will be added automatically. If your table should be read only, set the project page type to view.
      (2) Create a publication and add default or custom export buttons. This is only available with the premium version. This is documented here: https://wpdataaccess.com/docs/documentation/data-publisher/export-buttons/

      Does this help?

      Best regards,

      1. I’m using the premium version actually. I didn’t realize I can use this feature. It works fine! Sorry for the inconvenience.

        But I have two questions now, with respect to the premium buttons feature:
        – An empty column is autogenerated at first position (using flat tables). When the table is exported, this column appears on files. Could I avoid this?
        – This way only allows to export the rows showed at the moment. It is any way to export the entire database or, if it’s not possible, any way to add an extra view of, for example, 1000 rows?

        Thanks Peter. I really appreciate the help.

        Best regards.

        1. Hi Javier,

          >>> An empty column is autogenerated at first position (using flat tables). When the table is exported, this column appears on files.

          Sounds like a bug. Can I see this somewhere? Doe you have a URL I can visit? I think the plugin needs to handle this.

          >>> This way only allows to export the rows showed at the moment. It is any way to export the entire database or, if it’s not possible, any way to add an extra view of, for example, 1000 rows?

          The default buttons do not support this , but you can add custom buttons. This is documented here:

          Here is an example of code executed from a custom button:

          Or use the Code Manager:

          Let me know if you need help!

          Best regards,

  3. iam trying to adding third database using the plugin, but i don’t know whta is “MySQL schema:” !
    So i coudn’t add any databases because the plugin shows only two databases

    1. Hi Bodytayb,

      To add a remote database you must know the schema name. Without the schema name the plugin will not be able to connect. You might see a message that you are connected, but the plugin can only use your remote database connection with a valid schema name.

      Hope this helps,

    1. Hi Carl,

      The plugin actually supports inserts only. Updates are planned but not yet available. Hope to add this after the summer.

      Best regards,

      1. Hi Peter,

        Thanks for the response, I have set up 3 separate imports into the parent tables to populate the view table, its rather messy and long winded and if there are only 1 or two items its actually easier to do it by hand.
        If you do come up with a way to map to views I will buy that in a flash 🙂

  4. I created a table using Design table feature and tried to import csv file into the table. But there’s no option for CSV import, only sql file < 128 MB is allowed. I also don't see the import csv icon at top right corner of the data explorer page.
    Is there any way to enable it?
    Please help.

    1. Hi Adam,

      The workflow of the current version looks a bit different than the one in the video. Please try this:
      – Start the Data Explorer
      – Click button “imports and scripts”
      – Click tab Import CSV file
      – Click button Import CSV file
      – Click button Upload CSV file
      – Follow the procedure as shown in the video…

      Hope this helps,

  5. Hi Peter,
    I watch the video how to import a sql file to create a table. Everything seems to be going well. I received the message:
    INFO: Import `NURCodes.sql` is succesvol afgerond.
    But I don’t see the table.
    I create the script with Microsoft SQL Server Management Studio 18 on my server.
    Is there something wrong in the script?

    CREATE TABLE [dbo].[NURCodes] (
    [NURCode] NVARCHAR (3) NULL,
    [Rubriek] NVARCHAR (MAX) NULL,

    Kind regards,

    1. Hi Dante,

      I don’t think there is anything wrong with your script. The plugin just needs a ; directly folliwing by a new line character to identify your SQL command. The IMPORTANT commant below the import button is often overlooked. ( de kleine lettertjes 😉 )

      Hope this helps,

  6. Hi Peter,

    I have seen the important message and neatly a ; put at the end of the text
    The script must at this way?

    CREATE TABLE [dbo].[NURCodes] (;
    [NURCode] NVARCHAR (3) NULL,;
    [Rubriek] NVARCHAR (MAX) NULL,;

    Kind regards,

  7. when it finds duplicates during csv import , Is it possible to update instead of trying to insert ?

    1. Hi Aris,

      The import performs inserts only. If your table contains a primary or unique key, the insert will fail. This will be reported as an error. If you want to overwrite rows, you need to truncate the table before you import the CSV file (enable the checkbox when you import). Be careful! Truncate deletes all rows from the table! Not only imported rows.

      Hope this helps,

  8. Hi Peter,
    I followed the steps in the video, and the import CSV section shows me mapping successfully but I did not see something like ‘row inserted’. Thus, the table I created is still empty. It did not show any errors. What is the problem with it?

    1. Hi Chris,

      Can you share your CSV and table structure? Hoping it helps to reproduce the error. Please use the contactform to send the information it in private.


    1. Hi Edwin,

      Currently not, but I am working on it. Hope to launch May or June.

      But I am interested in your work flow! I would be grateful if you can drop a message through the contactform to explain the way you work and how you expect the plugin to work. The users wishlist is the developers roadmap…


Leave a Reply to Adam Cancel reply

Your email address will not be published.