Extractors.Tsv()

 

Updated: March 28, 2017

The Tsv() extractor disallows the delimiter parameter and defaults the field delimiter to '\t' (tab). All other parameters are the same. See Extractor Parameters (U-SQL) for supported parameters and their defaults values.

Examples

@searchlog =
     EXTRACT UserId          int,
             Start           DateTime,
             Region          string,
             Query           string,
             Duration        int?,
             Urls            string,
             ClickedUrls     string
     FROM "/Samples/Data/SearchLog.tsv"
     USING Extractors.Tsv(skipFirstNRows: 1);

OUTPUT @searchlog 
TO "/Output/ReferenceGuide/BuiltIn/UDOs/extractorTsv_SearchLog.csv" 
USING Outputters.Csv();


// TAB Separated Unicode file
@Drivers =
    EXTRACT driver_id   int,
        name            string,
        street          string,
        city            string,
        region          string,
        zipcode         string,
        country         string,
        phone_numbers   string // Map
 FROM "/Samples/Data/AmbulanceData/Drivers.txt"
 USING Extractors.Tsv(encoding:Encoding.Unicode);

OUTPUT @Drivers 
TO "/Output/ReferenceGuide/BuiltIn/UDOs/extractorTsv_Drivers.csv" 
USING Outputters.Csv();

See Also

Community Additions

ADD
Show: