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, 2019 in Apache Spark by Will
256 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, 2019 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, 2019 in Apache Spark by Yogi
415 views
0 votes
1 answer

How to increase the amount of data to be transferred to shuffle service at the same time?

The amount of data to be transferred ...READ MORE

answered Mar 1, 2019 in Apache Spark by Omkar
• 69,190 points
403 views
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, 2019 in Apache Spark by Raj
204 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, 2019 in Apache Spark by Begum
807 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, 2019 in Apache Spark by Jishan
464 views
0 votes
1 answer

Update hdfs data before stroring in MySql

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

answered Jan 27, 2019 in Big Data Hadoop by Omkar
• 69,190 points
329 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,830 points
243 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
• 69,190 points
1,838 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
1,249 views
0 votes
1 answer

error: reassingment to val

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

answered Jul 5, 2019 in Apache Spark by Gitika
• 65,890 points
1,612 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP