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

feat(bigquery): add media options to LoadConfig #8640

Merged
merged 2 commits into from Oct 4, 2023

Conversation

alvarowolfx
Copy link
Contributor

Allow users to customize how media upload happens on BigQuery Load Jobs.

// Load the table from a reader.
r := strings.NewReader("a,0\nb,1\nc,2\n")
wantRows := [][]Value{
	{"a", int64(0)},
	{"b", int64(1)},
	{"c", int64(2)},
}
rs := NewReaderSource(r)

loader := table.LoaderFrom(rs)
loader.WriteDisposition = WriteTruncate
loader.Labels = map[string]string{"test": "go"}
loader.MediaOptions = []googleapi.MediaOption{ // <- New option
	googleapi.ContentType("text/csv"),
	googleapi.ChunkSize(googleapi.MinUploadChunkSize),
}

Towards internal b/301126103

@alvarowolfx alvarowolfx requested review from a team as code owners October 3, 2023 20:28
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the BigQuery API. labels Oct 3, 2023
@alvarowolfx alvarowolfx merged commit 62baf56 into googleapis:main Oct 4, 2023
9 checks passed
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 5, 2023
🤖 I have created a release *beep* *boop*
---


## [1.56.0](https://togithub.com/googleapis/google-cloud-go/compare/bigquery/v1.55.0...bigquery/v1.56.0) (2023-10-05)


### Features

* **bigquery/analyticshub:** Add Subscription resource and RPCs ([#8612](https://togithub.com/googleapis/google-cloud-go/issues/8612)) ([9992249](https://togithub.com/googleapis/google-cloud-go/commit/999224951d586513bd382483326b455c953a14f3))
* **bigquery:** Add external dataset reference ([#8545](https://togithub.com/googleapis/google-cloud-go/issues/8545)) ([1001acf](https://togithub.com/googleapis/google-cloud-go/commit/1001acf6ac894a7d9945b7d204ad55aa7b162909))
* **bigquery:** Add media options to LoadConfig ([#8640](https://togithub.com/googleapis/google-cloud-go/issues/8640)) ([62baf56](https://togithub.com/googleapis/google-cloud-go/commit/62baf569c052a8c565710533ba50a1f5df8176dd))


### Bug Fixes

* **bigquery/storage/managedwriter:** Automatic retry for multiplex test ([#8601](https://togithub.com/googleapis/google-cloud-go/issues/8601)) ([6ef1945](https://togithub.com/googleapis/google-cloud-go/commit/6ef1945a837430afcd195affd661768817cdc40b))
* **bigquery:** Dependency detection on proto conversion ([#8566](https://togithub.com/googleapis/google-cloud-go/issues/8566)) ([763ab5d](https://togithub.com/googleapis/google-cloud-go/commit/763ab5dbd466fd0450dcd46e38c75e87cbf6c49c))


### Documentation

* **bigquery/datatransfer:** Update transferConfig.name description to indicate that it supports both formats ([0449518](https://togithub.com/googleapis/google-cloud-go/commit/0449518f8396cc0280c0f3303c103edcee34016b))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.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. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants