Extractors.Tsv()

Summary

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

  • The examples can be executed in Visual Studio with the Azure Data Lake Tools plug-in.
  • The examples below use the sample data provided with your Data Lake Analytics account. See Prepare source data for additional information.
    @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