In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Sqlldr technical terms do not do verbose, approachable that this is for the import or bulk import of .csv format data.
After opening the cmd, we can enter sqlldr to see the relevant information and help information, with a detailed analysis, must see!
So most of us use it with script documents and try to control the script ctl. Let's write a control script first.
Format:
Load data
Infile'd:\ test.csv'-- specify the file source address of the csv
Insert into table TEST_ONE-if you want to insert the table in the database, the data type column must be correct! It's important. Here are the parameters.
Insert into-the parameter is used when the table is inserted empty
Append-data is appended in the parameter table
Replace-- that's what parameter substitution truncate means.
Fields terminated by','--this means that fields are separated by commas, and field terminations are also used to TAB tabs (tabs)
Trailing nullcols-this fails when you have a null value in .csv. In this case, you can use the parameter to import a null value.
(name,id,data)-- this is the column in the data table, corresponding to the column imported by your source file .csv.
The above is to write a script for the most basic common syntax of .ctl, and the suffix of the script must be .ctl!
Use:
1. Open cmd
2. Input format:
Sqlldr userid=system/****@databases control='D:\ xx.ctl' log='D:\ tracking.log
Be careful not to report errors, but this may not be a success! More use of parameters should refer to the help provided by cmd to further select parameters.
3. Log:
Be sure to read the log to ensure the integrity of the data! Look at the log, there is nothing wrong or what null value has not been successfully inserted, and so on, these small errors will affect the integrity of the number, for example, because 36-bit null is discarded, so be careful!
SQLLDR commonly used so much, encountered how to insert NULL and "',''text, Baidu will come out to mainly add new parameters to achieve my later stage and continue to update the solution on the 350th error!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.