Import CSV file #
- Upload CSV file
- Perform column mapping
- 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.
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
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,
Peter
Hi Peter,
Is there any way to implement on a WordPress page a button to allow visitors to export table data?
Thanks.
Best regards.
Javier.
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/data-tables-buttons/export-pdf-csv-excel-sql/
Does this help?
Best regards,
Peter
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.
Javier.
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:
https://wpdataaccess.com/docs/data-tables-buttons/data-tables-custom-buttons/
Here is an example of code executed from a custom button:
https://code-manager.com/code/?wpda_search_column_code_name=Code-Manager-Export
Or use the Code Manager:
https://code-manager.com/blog/docs/index/shortcodes/javascript-shortcodes/
Let me know if you need help!
Best regards,
Peter
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
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,
Peter
Hi there,
How would I go about importing updated CSV data into a view rather than a table?
Thanks,
Carl.
Hi Carl,
The plugin actually supports inserts only. Updates are planned but not yet available. Hope to add this after the summer.
Best regards,
Peter
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 🙂
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.
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,
Peter
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] (
[NURCodeID] INT IDENTITY (1, 1) NOT NULL,
[NURCode] NVARCHAR (3) NULL,
[Rubriek] NVARCHAR (MAX) NULL,
CONSTRAINT [PK_NURCodes] PRIMARY KEY CLUSTERED ([NURCodeID] ASC)
);
Kind regards,
Dante
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,
Peter
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] (;
[NURCodeID] INT IDENTITY (1, 1) NOT NULL,;
[NURCode] NVARCHAR (3) NULL,;
[Rubriek] NVARCHAR (MAX) NULL,;
CONSTRAINT [PK_NURCodes] PRIMARY KEY CLUSTERED ([NURCodeID] ASC));
Kind regards,
Dante
when it finds duplicates during csv import , Is it possible to update instead of trying to insert ?
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,
Peter
thanks for the quick response
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?
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.
Thanks,
Peter
Can auto csv import into sql be done with your pro plugin?
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…
Thanks,
Peter
Currently im using wp data – access free plugin for may site every month will upload a csv file using this plugin about 15000 records. There is an sudden increment on the records so, i need to upload about 1,70000 records. It is possible to upload these much records in single attempt
Yes, that should be possible. It’s using a stream and performs a commit for each row so the file size should not matter. If you’re unsure, just copy your database table and create a fresh CSV import into your table copy. That allows you to perform a test run… Good luck!
Actually, I have tried with uploading around 170,000 records in csv files, but it was timed out. The memory size of the file about 250 MB only, it has 85 columns with 170,000 rows. I can be able to upload only up to the range of 35000 to 50000 rows in single stretch. If I add more rows while uploading facing timed out issue. I want to know whether it can be done through using free access in wp-data access plugin. Can you please provide solution for this issue?
Hi,
I’m trying to import a CSV that has accents (I’m french) but the problem is that when I preview the import, all the fields with accents are not uploaded.
How do I configure the plugin to accept accents ?
Thank you
Hi there,
Is your CSV file encoded in UTF-8? All CSV files are going to be read as UTF-8 in WP Data Access, the file to be imported also needs to be UTF-8 encoded.
To update your CSV’s encoding, you can open it with Notepad, and then save it again but change the encoding to UTF-8.
Please see: https://share.getcloudapp.com/mXuDm6bZ
Let us know if that works!
Thanks a lot, it works great!