To import the TXT file into the database (using Navicat), the column corresponding to the problem, there is a diagram

Source: Internet
Author: User
Keywords Php html python sql mysql


I have Coursera data with Python crawlers exist in the TXT file, I intend to import these files into the MySQL database table (using NAVICAT), each TXT store a field data, but when I actually import, there is no way to let left and right one by one corresponding, Instead, the data content in my field cannot be used, such as: the course account cannot be matched with the corresponding URL link. Ask the great God to answer! Thx!

Reply content:


I have Coursera data with Python crawlers exist in the TXT file, I intend to import these files into the MySQL database table (using NAVICAT), each TXT store a field data, but when I actually import, there is no way to let left and right one by one corresponding, Instead, the data content in my field cannot be used, such as: the course account cannot be matched with the corresponding URL link. Ask the great God to answer! Thx!

I have put Coursera data in a TXT file with a Python crawler, and intend to import these files into the MySQL database table (using NAVICAT), each TXT store a field of data,

It's your own problem, who makes you txt with only one field of data, importing another TXT will write another field in the new line, which is common sense. You use Navicat to export a txt to see the normal format.

It is recommended that you write a script merge 2 fields from 2 txt files into two fields in a CSV file, and then manually import the MySQL through Navicat

Or

Write a script directly to read two txt directly into MySQL

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.