Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Tampilan ASSIGNMENT_CHANGES
Tampilan INFORMATION_SCHEMA.ASSIGNMENT_CHANGES berisi daftar mendekati real-time
semua perubahan pada tugas dalam project administrasi. Setiap baris mewakili satu perubahan untuk satu tugas. Untuk informasi selengkapnya tentang reservasi, lihat Pengantar Reservasi.
Izin yang diperlukan
Untuk membuat kueri tampilan INFORMATION_SCHEMA.ASSIGNMENT_CHANGES, Anda memerlukan izin Identity and Access Management (IAM) bigquery.reservationAssignments.list untuk project tersebut.
Setiap peran IAM yang telah ditetapkan berikut menyertakan izin yang diperlukan:
Tampilan INFORMATION_SCHEMA.ASSIGNMENT_CHANGES memiliki skema berikut:
Nama kolom
Jenis data
Nilai
change_timestamp
TIMESTAMP
Waktu saat perubahan terjadi.
project_id
STRING
ID project administrasi.
project_number
INTEGER
Jumlah project administrasi.
assignment_id
STRING
ID yang secara unik mengidentifikasi tugas.
reservation_name
STRING
Nama pemesanan yang digunakan tugas.
job_type
STRING
Jenis tugas yang dapat menggunakan pemesanan. Dapat berupa PIPELINE atau QUERY.
assignee_id
STRING
ID yang secara unik mengidentifikasi resource penerima tugas.
assignee_number
INTEGER
Angka yang secara unik mengidentifikasi resource penerima tugas.
assignee_type
STRING
Jenis resource penerima tugas. Dapat berupa organization, folder, atau project.
action
STRING
Jenis peristiwa yang terjadi dengan penetapan. Dapat berupa CREATE, UPDATE, atau DELETE.
user_email
STRING
Alamat email pengguna atau subjek federasi identitas tenaga kerja yang melakukan perubahan. google untuk perubahan yang dibuat oleh Google. NULL jika alamat email tidak diketahui.
state
STRING
Status tugas. Dapat berupa PENDING atau ACTIVE.
Retensi data
Tampilan ini berisi tugas saat ini dan tugas yang dihapus yang disimpan maksimal 41 hari setelah tugas tersebut dihapus dari tampilan.
Cakupan dan sintaksis
Kueri terhadap tabel virtual ini harus menyertakan penentu region.
Jika Anda tidak menentukan penentu regional, metadata akan diambil dari semua region. Tabel berikut menjelaskan cakupan region untuk tabel virtual ini:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.ASSIGNMENT_CHANGES\u003c/code\u003e view provides a real-time log of all changes made to assignments within the administration project, with each row representing a single assignment change.\u003c/p\u003e\n"],["\u003cp\u003eAccess to query this view requires the \u003ccode\u003ebigquery.reservationAssignments.list\u003c/code\u003e IAM permission, which is included in several predefined roles such as \u003ccode\u003eroles/bigquery.resourceAdmin\u003c/code\u003e, \u003ccode\u003eroles/bigquery.user\u003c/code\u003e, and \u003ccode\u003eroles/bigquery.admin\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe schema includes details like \u003ccode\u003echange_timestamp\u003c/code\u003e, \u003ccode\u003eproject_id\u003c/code\u003e, \u003ccode\u003eassignment_id\u003c/code\u003e, \u003ccode\u003ereservation_name\u003c/code\u003e, \u003ccode\u003eaction\u003c/code\u003e (CREATE, UPDATE, DELETE), and \u003ccode\u003euser_email\u003c/code\u003e indicating who made the change.\u003c/p\u003e\n"],["\u003cp\u003eData within the view is retained for a maximum of 41 days after a deletion occurs, and the view must be queried using a region qualifier, like \u003ccode\u003eregion-us\u003c/code\u003e, to specify the data's geographic scope.\u003c/p\u003e\n"],["\u003cp\u003eAn example query demonstrates retrieving the most recent update, user email, and associated details for a specific assignment within a defined date range from the \u003ccode\u003eregion-us\u003c/code\u003e region.\u003c/p\u003e\n"]]],[],null,["# ASSIGNMENT_CHANGES view\n=======================\n\nThe `INFORMATION_SCHEMA.ASSIGNMENT_CHANGES` view contains a near real-time list\nof all changes to assignments within the administration project. Each row\nrepresents a single change to a single assignment. For more information about\nreservation, see [Introduction to Reservations](/bigquery/docs/reservations-intro).\n\nRequired permission\n-------------------\n\nTo query the `INFORMATION_SCHEMA.ASSIGNMENT_CHANGES` view, you need the\n`bigquery.reservationAssignments.list` Identity and Access Management (IAM) permission for\nthe project.\nEach of the following predefined IAM roles includes the required\npermission:\n\n- `roles/bigquery.resourceAdmin`\n- `roles/bigquery.resourceEditor`\n- `roles/bigquery.resourceViewer`\n- `roles/bigquery.user`\n- `roles/bigquery.admin`\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nThe `INFORMATION_SCHEMA.ASSIGNMENT_CHANGES` view has the following\nschema:\n\nData retention\n--------------\n\nThis view contains current assignments and deleted assignments that are\nkept for a maximum of 41 days after which they are removed from the view.\n\nScope and syntax\n----------------\n\nQueries against this view must include a [region qualifier](/bigquery/docs/information-schema-intro#syntax).\nIf you do not specify a regional qualifier, metadata is retrieved from all\nregions. The following table explains the region scope for this view:\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: any [dataset region name](/bigquery/docs/locations). For example, ```region-us```.\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | **Note:** You must use [a region qualifier](/bigquery/docs/information-schema-intro#region_qualifier) to query `INFORMATION_SCHEMA` views. The location of the query execution must match the region of the `INFORMATION_SCHEMA` view.\n\n\u003cbr /\u003e\n\nExample\n-------\n\nThe following example displays the user who has made the latest assignment\nupdate to a particular assignment within a specified date. \n\n```googlesql\nSELECT\n user_email,\n change_timestamp,\n reservation_name,\n assignment_id\nFROM\n `region-us`.INFORMATION_SCHEMA.ASSIGNMENT_CHANGES\nWHERE\n change_timestamp BETWEEN '2021-09-30' AND '2021-10-01'\n AND assignment_id = 'assignment_01'\nORDER BY\n change_timestamp DESC\nLIMIT 1;\n```\n\nThe result is similar to the following: \n\n```\n+--------------------------------+-----------------------+--------------------+-----------------+\n| user_email | change_timestamp | reservation_name | assignment_id |\n+--------------------------------+-----------------------+--------------------+-----------------+\n| cloudysanfrancisco@gmail.com |2021-09-30 09:30:00 UTC| my_reservation | assignment_01 |\n+--------------------------------+-----------------------+--------------------+-----------------+\n```"]]