-
Notifications
You must be signed in to change notification settings - Fork 592
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
Accept insertID for BigQuery API #1066
Conversation
Sometimes you would like to have control over insertID, in my case for each request I have *processedTimestamp* which defaults to current timestamp thus making md5 always unique and therefore making insertId inefficient.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
👍 |
Thanks for this @vladmiller! Did you see #1041? I think we're interested in a solution that allows specifying a |
@stephenplusplus It doesn't seems like there are any other fields except insertID, but things could change. I'll see if I can easily implement solution with raw option |
That's true, here's the spec: https://cloud.google.com/bigquery/docs/reference/v2/tabledata/insertAll
So, maybe the options object should also accept the var opts = {
raw: true,
ignoreUnknownValues: true
};
var row = {
insertId: 'my-id',
json: {
// row data
}
};
table.insert([row, row], opts, function() {}); |
@stephenplusplus okay, let's see if it's easy |
Thanks! |
Added ability to pass "raw" object and additional options
@stephenplusplus pushed new commit with tests and fix. Please check and let me know what you think. |
🤖 I have created a release *beep* *boop* --- ## [3.0.1](googleapis/nodejs-vision@v3.0.0...v3.0.1) (2022-09-21) ### Bug Fixes * Preserve default values in x-goog-request-params header ([#1044](googleapis/nodejs-vision#1044)) ([a5baeca](googleapis/nodejs-vision@a5baeca)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sometimes you would like to have control over insertID, in my case for each request I have processedTimestamp which defaults to current timestamp thus making md5 always unique and therefore making insertId inefficient.