GoogleCloudPlatform / google-cloud-powershell

PowerShell cmdlets for the Google Cloud Platform
http://googlecloudplatform.github.io/google-cloud-powershell/
Apache License 2.0
135 stars 61 forks source link

WriteMode parameter in Start-BqJob -Load CSV issue #648

Open LeszekF opened 3 years ago

LeszekF commented 3 years ago

Hi, I wanted to use -WriteMode parameter when starting job to load data from CSV to BigQuery table. Code: $job = $destTable | Start-BqJob -Load CSV "gs://$bucket/$remotePath" -FieldDelimiter "t" -MaxBadRecords 10 -SkipLeadingRows 1 -WriteMode WriteTruncate I get error: Start-BqJob : Google.Apis.Requests.RequestError Invalid value for jobConfigurationLoad.writeDisposition: WRITETRUNCATE is not a valid value [400] Errors [ Message[Invalid value for jobConfigurationLoad.writeDisposition: WRITETRUNCATE is not a valid value] Location[ - ] Reason[invalid] Domain[global]]

All works fine without -WriteMode parameter.

isarantis commented 3 weeks ago

I'm having the same issue. seems like the definition of the powershell does not match the api. (WRITE_APPEND vs WRITEAPPEND etc..)