Repository navigation
Bug: BigQuery: Need a way to set JobId... #1257
Copy link
Copy link
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Activity
- addedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.
on Sep 16, 2016 @tswast FYI
There doesn't appear to be a way to set the JobId
Where? and why is
cancelchallenging?Tim's explanation of the string variant of
cancel(String "id")is that it is a name provided by the user on create, in the case of the Python samples a UUID. The.jobId()is the other kind. If you can't ever set / create with a name/id, then what's the point of the string method?I presume, I could perhaps, use
.jobId().toString(), in the snippets, but that just seems weird.It's also terribly possible that I'm not understanding something, but Tim couldn't find it either, and wrote another issue for it.
But you can create a job passing your own name:
String jobName = "my_job"; JobInfo jobInfo = JobInfo.of(JobId.of(jobName), QueryJobConfiguration.of("SELECT * FROM table"));
- added a commit that references this issue
on Jul 14, 2022 - added a commit that references this issue
on Aug 9, 2022 - added a commit that references this issue
on Dec 22, 2025 - added a commit that references this issue
on Jan 22, 2026 - added a commit that references this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Mar 12, 2026 - added a commit that references this issue
on Mar 23, 2026 - added 2 commits that reference this issue
on Mar 30, 2026 - added 2 commits that reference this issue
on Apr 1, 2026
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
There doesn't appear to be a way to set the JobId, making cancel(String JobiD) challenging.
Looking at Python L35, The query Job takes a JobId. There doesn't appear to be a similar method for Java. ;(