INVALID_ARGUMENT projects.locations.transferConfig.create

355 views Asked by At

I try to create projects.locations.transferConfig.create on the page https://cloud.google.com/bigquery/docs/reference/datatransfer/rest/v1/projects.locations.transferConfigs/create

set parent projects/1069829667403/locations/eu

and Request body

{
  "dataRefreshWindowDays": 10,
  "destinationDatasetId": "stat",
  "displayName": "test",
  "dataSourceId": "adwords",
  "params": {
    "customer_id": "5030341011"
  }
}

and have error

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}

What am I doing wrong?

1

There are 1 answers

0
Vitalii Li On

Request body should look like this:

{
  "dataRefreshWindowDays": 10,
  "destinationDatasetId": "stat",
  "displayName": "test",
  "dataSourceId": "adwords",
  "params": {
    "fields": {
      "key": "customer_id",
      "value": {
        "string_value": "5030341011"
      }
    }
  }
}