Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ generate-proto: ## regenerate protos
@echo " > cloning protobuf from odpf/proton"
@echo " > generating protobuf"
@buf generate --template buf.gen.yaml https://github.com/odpf/proton/archive/a0bc6dbf2ad91abfebc4bf5f70e275983109baca.zip#strip_components=1 --path odpf/assets
@echo " > protobuf compilation finished"
@echo " > protobuf compilation finished"

lint: ## Lint with golangci-lint
golangci-lint run
4 changes: 4 additions & 0 deletions plugins/extractors/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ func (e *Extractor) buildPreview(ctx context.Context, t *bigquery.Table) (previe
err = errors.Wrapf(err, "error marshalling \"%s\" to json", t.FullyQualifiedName())
return
}
// sanitize unicode sequence
// replace unicode null characters with "null" string to ensure downstream would not have issues dealing with unicode null characters
jsonString := strings.ReplaceAll(string(jsonBytes), "\\u0000", "null")
jsonBytes = []byte(jsonString)
err = json.Unmarshal(jsonBytes, &temp)
if err != nil {
err = errors.Wrapf(err, "error marshalling \"%s\" to json", t.FullyQualifiedName())
Expand Down