In this article you will learn how to import CSV file into MySQL. When a Helical Insight is installed then by default MySQL database is installed with it.
Follow the steps to import CSV file into MySQL Database in Helical Insight:
- Download CSV file
- Open Command prompt as an Administrator
- Type the following command
cd “C:\Helical Insight\mysql-5.7.12-winx64\bin”
4. Now, press Enter
5. Type the following command
mysql -u hiuser -phiuser -P 3306
Whereas,
-u : Username
-p : Password
-P : Port Number
3306 : Portnumber configured during installation
6. Create a new Database where you want to import CSV file.
Command :
create database sampledb; use sampledb;
Create database : It will create a new database with the assigned name
Use : It will configure MySQL to use the configured database
7. Then, Create a Schema
8. To list the tables in a MySQL Database
Command :
mysql> show tables ;
9. To describe table details.
Command :
mysql > desc sampletable ;
10. Import CSV file into MySQL Database
Command :
LOAD DATA INFILE 'E:/samplecsv.csv' INTO TABLE sampletable FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS;
11. Data has been uploaded successfully. To view the data present in the table
Command :
select * from tablename;
12. Open Helical Insight in a file browser using URL
URL : http://localhost:8080/hi/
8080 : It is a port number and it can vary.
13. Enter the required credentials for successful login
For Example,
Username : hdiadmin
Password : hdiadmin
(click image to open)
14. After Successful Login, go to Adhoc Mode.
(click image to open)
15. Adhoc Mode
(click image to open)
16. Now, create a new datasource. Click Datasource -> Create -> Select Datasource Type
(click image to open)
17. Now, configure the connection details. Then click “Test Connection” to check connection status.
Note :
Database : Sampledb // Database name can vary
Username : hiuser
Password : hiuser
(click image to open)
18. After configuration, click on Save Datasource.
To know more in details visit,
View and Edit Datasource
19. Then, create a metadata.
To know more visit, how to create a metadata
20. Now you can create your Adhoc report using created metadata.
To know more visit, how to create an Adhoc report
In case of issue, post your query on forum.helicalinsight.com
or drop us a mail at support@helicalinsight.com