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

gcp - bq-job - update enum_spec #8994

Merged
merged 1 commit into from Oct 3, 2023
Merged

Conversation

Vit-ts
Copy link
Contributor

@Vit-ts Vit-ts commented Sep 29, 2023

The resource gcp.bq-job returned insufficient fields. By adding the 'projection': 'full' parameter I was able to see all the resource information.
Method: jobs.list: https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/list

resources.json before:

[
  {
    "id": "cloud-custodian:US.job_id",
    "kind": "bigquery#job",
    "jobReference": {
      "projectId": "cloud-custodian",
      "jobId": "job_id",
      "location": "US"
    },
    "state": "DONE",
    "errorResult": {
      "reason": "notFound",
      "message": "Not found: Dataset cloud-custodian:dataset_name was not found in location US"
    },
    "statistics": {
      "creationTime": "1695906539628",
      "startTime": "1695906539657",
      "endTime": "1695906539657"
    },
    "status": {
      "errorResult": {
        "reason": "notFound",
        "message": "Not found: Dataset cloud-custodian:dataset_name was not found in location US"
      },
      "state": "DONE"
    }
  }
]

resources.json after:

[
  {
    "id": "cloud-custodian:US.job_id",
    "kind": "bigquery#job",
    "jobReference": {
      "projectId": "cloud-custodian",
      "jobId": "job_id",
      "location": "US"
    },
    "state": "DONE",
    "errorResult": {
      "reason": "notFound",
      "message": "Not found: Dataset cloud-custodian:dataset_id was not found in location US"
    },
    "statistics": {
      "creationTime": "1695906539628",
      "startTime": "1695906539657",
      "endTime": "1695906539657"
    },
    "configuration": {
      "query": {
        "query": "SELECT /* do nothing */ 1;",
        "destinationTable": {
          "projectId": "cloud-custodian",
          "datasetId": "dataset_id",
          "tableId": "table_id"
        },
        "createDisposition": "CREATE_IF_NEEDED",
        "writeDisposition": "WRITE_EMPTY",
        "priority": "INTERACTIVE",
        "useQueryCache": true,
        "useLegacySql": false
      },
      "jobType": "QUERY"
    },
    "status": {
      "errorResult": {
        "reason": "notFound",
        "message": "Not found: Dataset cloud-custodian:dataset_id was not found in location US"
      },
      "errors": [
        {
          "reason": "notFound",
          "message": "Not found: Dataset cloud-custodian:dataset_id was not found in location US"
        }
      ],
      "state": "DONE"
    },
    "user_email": "test@cloud-custodian.iam.gserviceaccount.com",
    "principal_subject": "serviceAccount:test@cloud-custodian.iam.gserviceaccount.com"
  }
]

Copy link
Collaborator

@kapilt kapilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, lgtm

@kapilt kapilt merged commit 540b69c into cloud-custodian:main Oct 3, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants