File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,4 +35,7 @@ generate-proto: ## regenerate protos
3535 @echo " > cloning protobuf from odpf/proton"
3636 @echo " > generating protobuf"
3737 @buf generate --template buf.gen.yaml https://github.com/odpf/proton/archive/a0bc6dbf2ad91abfebc4bf5f70e275983109baca.zip#strip_components=1 --path odpf/assets
38- @echo " > protobuf compilation finished"
38+ @echo " > protobuf compilation finished"
39+
40+ lint : # # Lint with golangci-lint
41+ golangci-lint run
Original file line number Diff line number Diff line change @@ -312,6 +312,10 @@ func (e *Extractor) buildPreview(ctx context.Context, t *bigquery.Table) (previe
312312 err = errors .Wrapf (err , "error marshalling \" %s\" to json" , t .FullyQualifiedName ())
313313 return
314314 }
315+ // sanitize unicode sequence
316+ // replace unicode null characters with "null" string to ensure downstream would not have issues dealing with unicode null characters
317+ jsonString := strings .ReplaceAll (string (jsonBytes ), "\\ u0000" , "null" )
318+ jsonBytes = []byte (jsonString )
315319 err = json .Unmarshal (jsonBytes , & temp )
316320 if err != nil {
317321 err = errors .Wrapf (err , "error marshalling \" %s\" to json" , t .FullyQualifiedName ())
You can’t perform that action at this time.
0 commit comments