Harsimranjeet Singh
Harsimranjeet Singh

Reputation: 524

Getting Error while processing simple csv file

I'm trying to Process Source file, with below usql script, but getting error while submitting job to ADLA as screen shot below.

I thought it would be csv issue created from openoffice, so created again from excel but result are same. would appreciate if anyone can provide suggestion about what i'm missing here.

DECLARE @in  string = "/output/SearchLog-from-Data-Lake-cp.csv";
DECLARE @out string = "/output/trckout.csv";

 @CustData =
     EXTRACT CustomerUniqueID   int     ,
     CusLocationID              int   ,
     [PIM]                      int   ,
     AgeGender                  string  ,
     Mood                       string  ,
//     StartDate                  DateTime,
     ImagePath                  string  ,
//     EndDate                    DateTime,
     OutletName                 string  ,
     OutletStreet               string  ,
     OutletCity                 string  ,
     OutletState                string  ,
     OutletAreaCode             string  ,
     OutletCountry              string  ,
     Outletlandmark             string  ,
     OutletWeather              string  ,
     BrandName                  string  ,
     BrandStreet                string  ,
     BrandCity                  string  ,
     BrandState                 string  ,
     BrandAreaCode              string  ,
     BrandCountry               string  ,
     Brandlandmark              string  ,
     CamLocName                 string  ,
     CamAddress                 string  ,
     CamZone                    string  ,
     CamContactName             string  ,
     CamEmailID                 string  ,
     CamPhone                   string  ,
     CamNotloc                  string  ,
     CamNotZon                  string  ,
     CamNotContctName           string  ,
     CamNotPhone                string  ,
     CamNotEmailID              string  ,
     CamSMSNot                  string

     FROM @in
//     USING Extractors.Csv(skipFirstNRows:1);
USING Extractors.Csv();


OUTPUT @CustData   
    TO @out
      USING Outputters.Csv();

ERROR enter image description here

Upvotes: 0

Views: 103

Answers (1)

Nabeel
Nabeel

Reputation: 114

The input has the data for 1 column - OutletLandmark - in 3 columns:

  • NEAR,TRIBUNE,CHOWNK.

which results in the column count mismatch. The input data needs to be fixed.

Upvotes: 2

Related Questions