Fix some comment typos and errors

1. added missing null guard in 3-Extract-Output-ComplexTypes.usql
2. fixed wrong column name reference in
3-Extract-Output-ComplexTypes.usql
3. added no option output to 4-Output-Options.usql for comparison
4. Fixed comment typos in 6-Extract-withHeaders.usql
This commit is contained in:
Mike Rys 2016-11-02 14:19:35 -07:00
Родитель d5ddf389b9
Коммит a815d4e45f
3 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -34,7 +34,8 @@ FROM @Drivers;
// Serialize SQL.MAP into string (or byte[]) for serialization
@OutDrivers =
SELECT driver_id, name, street, city, region, zipcode, country
, String.Join(",", phone_numbers.Select(p => String.Format("{0}:{1}", p.Key, p.Value))) AS phone_numbers
, phone_numbers == null ? null :
String.Join(",", phone_numbers.Select(p => String.Format("{0}:{1}", p.Key, p.Value))) AS phone_numbers
FROM @Drivers;
OUTPUT @OutDrivers TO "/output/builtinUDO/Drivers.csv" USING Outputters.Csv();
@ -60,7 +61,7 @@ FROM @Trips;
// Serialize SQL.ARRAY into string (or byte[]) for serialization
@OutTrips =
SELECT date, driver_id, vehicle_id
, String.Join(",", trips) AS trips
, String.Join(",", trip_ids) AS trips
FROM @Trips;

Просмотреть файл

@ -10,6 +10,10 @@ FROM (VALUES
, ("This row contains CR LF \r\n", (double?) 2342, DateTime.Parse("2016-04-05T12:12:12.918"))
) AS T(s_col, d_col, dt_col);
OUTPUT @SampleRows
TO "/output/builtinUDO/nooptions.csv"
USING Outputters.Csv();
OUTPUT @SampleRows
TO "/output/builtinUDO/QuotedOptions.csv"
USING Outputters.Text(delimiter:'&', quoting: true, escapeCharacter: '$', nullEscape: "\\N");

Просмотреть файл

@ -69,7 +69,7 @@ USING Outputters.Csv();
///
// silent:true will skip incorrect number of rows or replaces invalid invalid casts to nullable types. It will not skip encoding errors, allow invalid casts to not-nullable types, or skip a row where a cast error occurs.
// silent:true will skip incorrect number of columns or replaces invalid casts to nullable types. It will not skip encoding errors, allow invalid casts to not-nullable types, or skip a row where a cast error occurs.
@silent_r =
EXTRACT id long?,
name string,