diff --git a/docs/language/operators/cut.md b/docs/language/operators/cut.md index 2fee314001..6c26badbb5 100644 --- a/docs/language/operators/cut.md +++ b/docs/language/operators/cut.md @@ -74,8 +74,14 @@ echo '1 {a:1,b:2,c:3}' | zq -z 'cut a,b' - {a:error("missing"),b:error("missing")} {a:1,b:2} ``` -_Set default values for fields with null values_ -This can be helpful when using the `csv` export format, which expects a uniform record structure (which includes field types). +_Invoke a function while cutting to set a default value for a field_ + +:::tip +This can be helpful to transform data into a uniform record type, such as if +the output will be exported in formats such as `csv` or `parquet` (see also: +[`fuse`](fuse.md)). +::: + ```mdtest-command echo '{a:1,b:null}{a:1,b:2}' | zq -z 'cut a,b:=coalesce(b, 0)' - ``` @@ -83,4 +89,4 @@ echo '{a:1,b:null}{a:1,b:2}' | zq -z 'cut a,b:=coalesce(b, 0)' - ```mdtest-output {a:1,b:0} {a:1,b:2} -``` \ No newline at end of file +```