Skip to content

Commit

Permalink
Allow table without schema
Browse files Browse the repository at this point in the history
  • Loading branch information
osamingo committed Dec 12, 2024
1 parent e411226 commit d07ba4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,10 @@ func (h *uploadContentHandler) Handle(ctx context.Context, r *uploadContentReque
return err
}
columnToType := map[string]types.Type{}
for _, field := range tableContent.Schema.Fields {
columnToType[field.Name] = types.Type(field.Type)
if tableContent.Schema != nil {
for _, field := range tableContent.Schema.Fields {
columnToType[field.Name] = types.Type(field.Type)
}
}

sourceFormat := load.SourceFormat
Expand Down

0 comments on commit d07ba4d

Please sign in to comment.