Write the document back to the database using R

Source: Internet
Author: User

#Import FMCG Ultra-sensitive and sensitive productsDim_username_dept <-read.table (file ="~/dm/cluster/yihaodianbao",                                    #Header = TRUE,Sep ="\ t",                                    #strip.white = TRUE,Stringsasfactors =FALSE) str (dim_username_dept) head (dim_username_dept) names (dim_username_dept)<-C ("user_name","Full_name","EMAIL","DEPT")## Write Databases TablesLibrary"DBI") Library ("roracle") DRV<-Dbdriver ("Oracle") Con<-Dbconnect (DRV,"Tangjingxiao1","cathy,123", dbname ="10.0.1.226:1521/edwstd01")#write back to the name of the field in the database, be sure to capitalize it, otherwise it will not be recognized in OracleNames (dim_username_dept) <-ToUpper (Names (dim_username_dept))#write back to the table name of the database, be sure to capitalizeDbwritetable (Con, ToUpper ("dim_username_dept"), dim_username_dept, row.names =FALSE) Dbcommit (con) dbdisconnect (con)

Write the document back to the database using R

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.