Skip to content

Commit

Permalink
Use DefaultDataset in Job
Browse files Browse the repository at this point in the history
  • Loading branch information
earada committed Dec 1, 2024
1 parent e411226 commit f636484
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1400,13 +1400,17 @@ func (h *jobsInsertHandler) Handle(ctx context.Context, r *jobsInsertRequest) (*
return nil, fmt.Errorf("failed to start transaction: %w", err)
}
defer tx.RollbackIfNotCommitted()
datasetId := ""
if job.Configuration.Query.DefaultDataset != nil {
datasetId = job.Configuration.Query.DefaultDataset.DatasetId
}
hasDestinationTable := job.Configuration.Query.DestinationTable != nil
startTime := time.Now()
response, jobErr := r.server.contentRepo.Query(
ctx,
tx,
r.project.ID,
"",
datasetId,
job.Configuration.Query.Query,
job.Configuration.Query.QueryParameters,
)
Expand Down

0 comments on commit f636484

Please sign in to comment.