Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: BigQuery: Need a way to set JobId... #1257

Closed
lesv opened this issue Sep 16, 2016 · 4 comments
Closed

Bug: BigQuery: Need a way to set JobId... #1257

lesv opened this issue Sep 16, 2016 · 4 comments
Assignees
Labels
api: bigquery Issues related to the BigQuery API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@lesv
Copy link
Contributor

lesv commented Sep 16, 2016

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. ;(

    client = bigquery.Client()
    query_job = client.run_async_query(str(uuid.uuid4()), query)
    query_job.use_legacy_sql = False
    query_job.begin()
@lesv lesv added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: bigquery Issues related to the BigQuery API. labels Sep 16, 2016
@lesv
Copy link
Contributor Author

lesv commented Sep 16, 2016

@tswast FYI

@mziccard
Copy link
Contributor

There doesn't appear to be a way to set the JobId

Where? and why is cancel challenging?

@lesv
Copy link
Contributor Author

lesv commented Sep 17, 2016

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.

@mziccard
Copy link
Contributor

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"));

github-actions bot pushed a commit that referenced this issue Jul 14, 2022
github-actions bot pushed a commit that referenced this issue Aug 9, 2022
🤖 I have created a release *beep* *boop*
---


## [3.5.0](googleapis/java-asset@v3.4.2...v3.5.0) (2022-08-09)


### Features

* Remove v1p4beta1 API protos. v1p4beta1 has been deprecated and announced through MSA. This is the cleanup ([ebab5c6](googleapis/java-asset@ebab5c6))


### Dependencies

* update dependency com.google.api.grpc:proto-google-cloud-orgpolicy-v1 to v2.3.0 ([#1257](googleapis/java-asset#1257)) ([c61c0e8](googleapis/java-asset@c61c0e8))
* update dependency com.google.api.grpc:proto-google-cloud-os-config-v1 to v2.5.1 ([#1279](googleapis/java-asset#1279)) ([5995764](googleapis/java-asset@5995764))
* update dependency com.google.api.grpc:proto-google-cloud-pubsub-v1 to v1.102.10 ([#1292](googleapis/java-asset#1292)) ([76f886e](googleapis/java-asset@76f886e))
* update dependency com.google.api.grpc:proto-google-cloud-pubsub-v1 to v1.102.9 ([#1280](googleapis/java-asset#1280)) ([a35d490](googleapis/java-asset@a35d490))
* update dependency com.google.cloud:google-cloud-bigquery to v2.14.0 ([#1272](googleapis/java-asset#1272)) ([60763d4](googleapis/java-asset@60763d4))
* update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#1274](googleapis/java-asset#1274)) ([8b4efa5](googleapis/java-asset@8b4efa5))
* update dependency com.google.cloud:google-cloud-bigquery to v2.14.2 ([#1294](googleapis/java-asset#1294)) ([ff76d3a](googleapis/java-asset@ff76d3a))
* update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#1296](googleapis/java-asset#1296)) ([4c2a6ec](googleapis/java-asset@4c2a6ec))
* update dependency com.google.cloud:google-cloud-core to v2.8.3 ([#1273](googleapis/java-asset#1273)) ([1ad7821](googleapis/java-asset@1ad7821))
* update dependency com.google.cloud:google-cloud-core to v2.8.4 ([#1275](googleapis/java-asset#1275)) ([a45d90c](googleapis/java-asset@a45d90c))
* update dependency com.google.cloud:google-cloud-core to v2.8.5 ([#1276](googleapis/java-asset#1276)) ([985d6e6](googleapis/java-asset@985d6e6))
* update dependency com.google.cloud:google-cloud-core to v2.8.6 ([#1283](googleapis/java-asset#1283)) ([26f527c](googleapis/java-asset@26f527c))
* update dependency com.google.cloud:google-cloud-core to v2.8.7 ([#1285](googleapis/java-asset#1285)) ([fe40190](googleapis/java-asset@fe40190))
* update dependency com.google.cloud:google-cloud-core to v2.8.8 ([#1288](googleapis/java-asset#1288)) ([566e032](googleapis/java-asset@566e032))
* update dependency com.google.cloud:google-cloud-pubsub to v1.120.1 ([#1229](googleapis/java-asset#1229)) ([dcc463c](googleapis/java-asset@dcc463c))
* update dependency com.google.cloud:google-cloud-pubsub to v1.120.10 ([#1293](googleapis/java-asset#1293)) ([d6188ca](googleapis/java-asset@d6188ca))
* update dependency com.google.cloud:google-cloud-pubsub to v1.120.9 ([#1281](googleapis/java-asset#1281)) ([79d5a3c](googleapis/java-asset@79d5a3c))
* update dependency com.google.cloud:google-cloud-resourcemanager to v1.5.0 ([#1261](googleapis/java-asset#1261)) ([1cca78c](googleapis/java-asset@1cca78c))
* update dependency com.google.cloud:google-cloud-resourcemanager to v1.5.2 ([#1287](googleapis/java-asset#1287)) ([a399744](googleapis/java-asset@a399744))
* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1277](googleapis/java-asset#1277)) ([7a27f49](googleapis/java-asset@7a27f49))
* update dependency com.google.cloud:google-cloud-storage to v2.10.0 ([#1282](googleapis/java-asset#1282)) ([66ba2ad](googleapis/java-asset@66ba2ad))
* update dependency com.google.cloud:google-cloud-storage to v2.11.0 ([#1286](googleapis/java-asset#1286)) ([4df8988](googleapis/java-asset@4df8988))
* update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#1291](googleapis/java-asset#1291)) ([3af9102](googleapis/java-asset@3af9102))
* update dependency com.google.cloud:google-cloud-storage to v2.11.2 ([#1295](googleapis/java-asset#1295)) ([693d42b](googleapis/java-asset@693d42b))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants