diff --git a/Examples/Builtin-UDOs/Builtin-UDOs/3-Extract-Output-ComplexTypes.usql b/Examples/Builtin-UDOs/Builtin-UDOs/3-Extract-Output-ComplexTypes.usql index c33591f..cf7382a 100644 --- a/Examples/Builtin-UDOs/Builtin-UDOs/3-Extract-Output-ComplexTypes.usql +++ b/Examples/Builtin-UDOs/Builtin-UDOs/3-Extract-Output-ComplexTypes.usql @@ -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; diff --git a/Examples/Builtin-UDOs/Builtin-UDOs/4-Output-Options.usql b/Examples/Builtin-UDOs/Builtin-UDOs/4-Output-Options.usql index 7ddb71e..e9ddc6a 100644 --- a/Examples/Builtin-UDOs/Builtin-UDOs/4-Output-Options.usql +++ b/Examples/Builtin-UDOs/Builtin-UDOs/4-Output-Options.usql @@ -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"); diff --git a/Examples/Builtin-UDOs/Builtin-UDOs/6-Extract-withHeaders.usql b/Examples/Builtin-UDOs/Builtin-UDOs/6-Extract-withHeaders.usql index f6e2eb2..8dcee3a 100644 --- a/Examples/Builtin-UDOs/Builtin-UDOs/6-Extract-withHeaders.usql +++ b/Examples/Builtin-UDOs/Builtin-UDOs/6-Extract-withHeaders.usql @@ -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,