Load CSV file data inot MySQL

0 votes

Hello,

I am trying to load csv file data into MySQL table using 

LOAD DATA INFILE "filename" INTO TABLE "tablename" FIELDS TERMINATED BY "," LINES TERMINATED BY "\n" IGNORE 1 ROWS 

in MySQL prompt but getting error 1290 saying that they MySQL server is running with the --secure-file-priv option so it cannot execute this statement.
 

Jul 25, 2019 in Apache Spark by Jishan
39 views

1 answer to this question.

0 votes

If you are trying to load file from your system, you have to mention the keyword "local". Try this:

load data local infile "filename" INTO TABLE "tablename" FIELDS TERMINATED BY "," LINES TERMINATED BY "\n" IGNORE 1 ROWS
answered Jul 25, 2019 by Sita

Related Questions In Apache Spark

0 votes
0 answers

Load data to mysql from local

I'm trying to load data to mysql ...READ MORE

Jul 23, 2019 in Apache Spark by Yogi
57 views
+1 vote
1 answer

Scala: CSV file to Save data into HBase

Check the reference code mentioned below: def main(args: ...READ MORE

answered Jul 25, 2019 in Apache Spark by Hari
225 views
0 votes
1 answer

Spark: Saving file csv

 If you need a single output file ...READ MORE

answered May 22, 2019 in Apache Spark by Rishi
279 views
0 votes
1 answer

When we create an RDD, does it bring the data and load it into the memory?

Hey, No, an RDD is made up of ...READ MORE

answered Jul 3, 2019 in Apache Spark by Gitika
• 25,440 points
44 views
+1 vote
1 answer
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,840 points
3,873 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,840 points
532 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
20,497 views
0 votes
1 answer

How to load data of .csv file in MySQL Database Table?

You can do it using a code ...READ MORE

answered Jul 22, 2019 in Apache Spark by Vishwa
60 views
0 votes
1 answer

Spark, Scala: Load custom delimited file

You can load a DAT file into ...READ MORE

answered Jul 16, 2019 in Apache Spark by Shri
1,051 views