Error: Loading data to mysql

0 votes

Need Help. 

[edureka]> LOAD DATA INFILE "/user/edureka_422446/spark/county_facts_dictionary.csv"
-> INTO TABLE county_facts_dictionary
-> COLUMNS TERMINATED BY ","
-> OPTIONALLY ENCLOSED BY """
-> ESCAPED BY """
-> LINES TERMINATED BY "\n"
-> IGNORE 1 LINES;
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
Jul 23 in Apache Spark by Will
44 views

1 answer to this question.

0 votes

You have to use sqoop to export data from hdfs to mysql, first you have to create a table in mysql with schema based on the type of data you have then use the below command to export the data from hdfs to mysql in the webconsole,

sqoop export --connect jdbc:mysql://sqoopdb.edu.cloudlab.com/databasename --table tabename --username labuser --password edureka 

-m 1 --fields-terminated-by "," --lines-terminated-by "\n" --export-dir /user/edureka_422446/spark/county_facts_dictionary.csv
answered Jul 23 by Janan

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 in Apache Spark by Yogi
44 views
0 votes
1 answer
0 votes
1 answer

How to increase wait time to launch data-local task?

You can increase the locality wait time ...READ MORE

answered Mar 11 in Apache Spark by Raj
46 views
+1 vote
1 answer

Need to load 40 GB data to elasticsearch using spark

Did you find any documents or example ...READ MORE

answered Nov 5 in Apache Spark by Begum
152 views
0 votes
1 answer

Error Loading data to mysql in Spark

You have to use sqoop to export data ...READ MORE

answered Jul 11 in Apache Spark by Jishan
53 views
0 votes
1 answer

Update hdfs data before stroring in MySql

Yes, you can update the data before ...READ MORE

answered Jan 27 in Big Data Hadoop by Omkar
• 68,180 points
41 views
0 votes
1 answer

Using Hadoop for Data Analytics.

Yes, your approach is correct - you ...READ MORE

answered Sep 28, 2018 in Big Data Hadoop by Frankie
• 9,810 points
45 views
0 votes
1 answer

How to open MySql console in Ubuntu?

sudo service mysqld restart mysql -u <username> root ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 68,180 points
150 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 in Apache Spark by Vishwa
45 views
0 votes
1 answer

error: reassingment to val

Hi, This error will only generate when you ...READ MORE

answered Jul 4 in Apache Spark by Gitika
• 25,420 points
20 views