我正在从S3存储桶加载一个csv文件。我不确定为什么会一直收到这些警告。我有一个lambda,它每天都会运行代码,但不会成功运行带有64条警告的代码。
我尝试在sql语句中添加IGNORE。加载sql代码时,我至少检查了csv输入列10次。我似乎找不到问题。
我的加载脚本:
USE pauto;
LOAD DATA FROM S3 'csv file'
IGNORE INTO TABLE bmwloadsales
FIELDS TERMINATED BY ',' ENCLOSED BY '"' lines terminated by '\r\n'
IGNORE 1 LINES
(@filetype,@dvdealerid, @vendordealerid, @dmstype,
@dealnumber,@customernumber, @fullname, @salutation, @firstname,
@middlename, @lastname,@suffix,@addressline1,@addressline2,
@city, @state, @zip, @county, @homephone, @cellphone, @workphone,
@workextension, @email1, @email2, @email3, @birthdate,
@individualbusinessflag, @optout,@blockemail,
@blockphone, @blockmail, @language, @customercreatedate,
@customerlastactivitydate, @cobuyercustomernumber, @cobuyerfullname,
@cobuyersalutation, @cobuyerfirstname,
@cobuyermiddlename, @cobuyerlastname, @cobuyersuffix,
@cobuyeraddressline1, @cobuyeraddressline2, @cobuyercity, @cobuyerstate,
@cobuyerzip, @cobuyercounty,@cobuyerhomephone,
@cobuyercellphone, @cobuyerworkphone, @cobuyerworkextension,
@cobuyeremail1, @cobuyeremail2, @cobuyeremail3, @cobuyerbirthdate,
@cobuyerindividualbusinessflag, @cobuyeroptout,
@cobuyerblockemail, @cobuyerblockphone, @cobuyerblockmail,@vin, @year,
@make, @model, @modelnumber, @mileage,
@description,@exteriorcolor,@newused,@stocknumber,@transmission,
@ engineconfiguration,@ trim,@ enginenumber,@ chassisnumber,@ licenseplatenumber,
@ deliverydate,@ deliverymileage,@ inventorydate,@ inservicedate,@ vinexplosionyear,@ vinexplosionmake, @ vinexplosionmodel,@ vinexplosiontrim,@ vinexplosiontransmissiontype,@ vinexplosionfueltype,@ vinexplosionenginesize,@ vinexplosiongvwrange,@ trade1vin,@ trade1year,@ trade1make, @ trade1model,@ trade1odometer,@ trade1actualcashvalue,@ trade1gross,@ trade1payoff,@ trade2vin,@ trade2year,@ trade2make,@ trade2model,@ trade2odometer,@ trade2actualcashvalue, @ trade2gross,@ trade2payoff,@ salesman1number,@ salesman1name,@ salesman2number,@ salesman2name,@ salesman3number,@ salesman3name,@ closingmanagernumber,@ closingmanagername, @ financemanagernumber,@ financemanagername,@ salesmanagernumber,@ salesmanmanagername,@ msrp,@ listprice,@ salesprice,@ journalprice,@ cost,@ journalcost,@ adjustments, @ adjustedcost,@ incentives,@ packamount,@ salenet,@ totaltradeactualcashvalue,@ totaltradegross,@ weowefront,@ totalfrontfeesaftermarketprofit,@ totalfrontcommission,@ totalfrontsales, @ totalfrontcost,@ frontgross,@ financeprofit,@ totalwarrantyprofit,@ weoweback,@ insuranceprofit,@ totalbackfeesaftermarketprofit,@ financereserve,@ totalbackcommission, @ totalbacksales,@ totalbackcost,@ backgross,@ totalprofit,@ grossprofit,@ grosspayable,@ dealstatus,@ entrydate,@ bookeddate,@ finalizeddate,@ contractdate,@ accountingdate, @ statuschangedate,@ firstpaydate,@ dealtype,@ saletype,@ bankid,@ bankname,@ bankaddress,@ term,@ amountfinanced,@ apr,@ monthlypayment,@ paymenttotal,@ rebates,@ deposit,@ downpay, @ totalnettrades,@ totaldown,@ balloonamount,@ adjustedballoonamount,@ holdbackamount,@ totaldriveoffamount,@ licensefee,@ registrationfee,@ documentationfee,@ financecharge, @ totalpickuppayments,@ sellrate,@ buyrate,@ residualrate,@ residualamount,@ allowedmiles,@ estimatedmiles,@ mileagerate,@ acquisitionfee,@ basepayment,@ securitydeposit, @ totalcapitalreduction,@ netcapitalcost,@ leasedepreciationvalue,@ dealerfees,@ governmentfees,@ totaltax,@ registrationstate,@ reportofsalenumber,@ salesman1totalcommission, @ salesman1frontcommission,@ salesman1backcommission,@ salesman2totalcommission,@ salesman2frontcommission,@ salesman2backcommission,@ salesman3totalcommission, @ salesman3frontcommission,@ salesman3backcommission,@ warranty1name,@ warranty1sale,@ warranty1cost,@ warranty1miles,@ warranty1term,@ warranty2name,@ warranty2sale,@ warranty2cost, @ warranty2miles,@ warranty2term,@ warranty3name,@ warranty3sale,@ warranty3cost,@ warranty3miles,@ warranty3term,@ warranty4name,@ warranty4sale,@ warranty4cost,@ warranty4miles, @ warranty4term,@ warranty5name,@ warranty5sale,@ warranty5cost,@ warranty5miles,@ warranty5term,@ totalfeeaftermarketsale,@ totalfeeaftermarketcost,@ feeaftermarket1name, @ feeaftermarket1sale,@ feeaftermarket1cost,@ feeaftermarket1profitindicator,@ feeaftermarket2name,@ feeaftermarket2sale,@ feeaftermarket2cost,@ feeaftermarket2profitindicator, @ feeaftermarket3name,@ feeaftermarket3sale,@ feeaftermarket3cost,@ feeaftermarket3profitindicator,@ feeaftermarket4name,@ feeaftermarket4sale,@ feeaftermarket4cost, @ feeaftermarket4profitindicator,@ feeaftermarket5name,@ feeaftermarket5sale,@ feeaftermarket5cost,@ feeaftermarket5profitindicator,@ feeaftermarket6name,@ feeaftermarket6sale) SET交易编号= @交易编号, fullname = @ fullname, 称呼= @称呼, firstname = @ firstname, middlename = @ middlename, lastname = @ lastname, suffix = @ suffix, 地址1 = @地址行1, 地址2 = @地址行2, city = @ city, 状态= @状态, zip = @ zip, 县= @县, homephone = @ homephone, 手机= @手机, email = @ email1, indivorbus = @ individualbusinessflag, cobuyerfullname = @ cobuyerfullname, cobuyersalutation = @ cobuyersalutation, cobuyerfirstname = @ cobuyerfirstname, cobuyermiddlename = @ cobuyermiddlename, cobuyerlastname = @ cobuyerlastname, 库存日期= STR_TO_DATE(@库存日期,“%m /%d /%Y”), vin = TRIM(@vin), 年= STR_TO_DATE(@年,“%Y”), make = @ make, 模型= @模型, odometer = IFNULL(NULLIF(@mileage,''),0), dvddealerid = @ dvdealerid, salesperson = @ salesman1名称, salesperson2 = @ salesman2name, 在这里购买=“是”, carwashmember ='', Purchaseheredate = STR_TO_DATE(@contractdate,“%m /%d /%Y”);
我希望代码在没有任何警告的情况下运行。抱歉,我知道这是一个很长的脚本。...谢谢!
列标题:
文件类型DV经销商ID供应商经销商ID DMS类型交易编号客户编号致谢名字中间名姓氏后缀地址行1地址行2城市州邮编县家电话手机工作电话工作扩展电子邮件1电子邮件2电子邮件3出生日期个人/企业标志选择退出阻止电子邮件阻止电话阻止邮件语言客户创建日期客户最后活动日期共同买方顾客编号共同买方全名共同买方称呼共同买方名字共同买方中间名共同买方姓氏共同购买者后缀共同购买者地址行1共同购买者地址行2共同购买者城市共同购买者州共同购买者邮编共同购买者县共同购买者家用电话共同购买者手机共同购买者工作电话公司买方工作扩展共同买方电子邮件1共同买方电子邮件2共同买方电子邮件3共同买方出生日期共同买方个人/业务标志共同买方选择退出共同买方区号共同买方区号电话共同买方区号VIN年份制作型号型号里程说明外饰颜色全新/二手库存编号传输引擎配置饰板引擎编号机箱编号车牌号交付日期交付里程存货日期服务日期VIN爆炸年份VIN爆炸年份VIN爆炸型号VIN爆炸饰件VIN爆炸传输类型VIN爆炸燃料类型VIN爆炸引擎尺寸VIN爆炸GVW范围贸易1 VIN贸易1年贸易1贸易1模型贸易1里程表贸易1实际现金价值贸易1总贸易1支付贸易2 VIN贸易2年贸易2贸易2模型贸易2里程表交易2实际现金价值交易2总交易2支付推销员1号推销员1名名称推销员2号推销员2名推销员3号推销员3名结帐管理器号结帐管理器名称财务经理号财务管理器名称推销员管理器编号推销员管理器名称MSRP大号价格销售价格日记帐价格成本日记帐成本调整调整后的成本激励打包金额销售净交易总额实际现金总价值交易总额我们欠账前总费用/售后利润总前佣金总额前销售总额前费总成本前财务总利润保修总利润我们欠欠保险利润总欠费/售后利润财务储备金总返还佣金总额返销总返还成本返还毛利毛利毛利毛利应付总交易状态录入日期预定日期最终日期合同日期会计日期状态更改日期首次支付日期交易类型销售类型银行ID银行名称银行地址期限金额财务APR每月付款付款总额回扣押金首付总额净交易总额总计首期金额调整后的首期金额保留金额总计离职金额许可费注册费文件费财务费用e总提货付款卖出率购买率剩余率剩余率允许里程数估计里程数里程率购置费基本付款保证金总资本减少额净资本成本租赁折旧值经销商费用政府费用总税收登记州销售报告数量销售员1总佣金销售员1前部佣金推销员1后部佣金推销员2总佣金推销员2前部佣金推销员2后部佣金推销员3总佣金推销员3前部佣金推销员3后部佣金保修1名称保修1销售保修1成本保修1里程保修1期限保修2名称保修2销售保修2成本保修2里程保修2期限保修3名称保修3销售保修3成本保修3英里保修3期限保修4名称保修4销售保修4成本保修4里程保修4期限保修5名称保修5销售保修5成本保修5 Miles Warra nty 5期限总费用/售后销售总费用/售后成本费用/售后市场1名称费/售后市场1销售费用/售后市场1成本费用/售后市场1利润指标费/售后市场2名称费用/售后市场2销售费用/售后市场2费用/售后市场2利润指标费用/售后市场3名称费用/售后市场3销售费用/售后市场3成本费用/售后市场3利润指标费用/售后市场4名称费用/售后市场4销售费用/售后市场4费用费用/售后市场4利润指标费用/售后市场5名称费用/售后市场5销售费用/售后市场5成本费用/售后市场5利润指标费用/售后市场6名称费用/售后市场6