diff --git a/datasets/google_dei/_terraform/diversity_annual_report_pipeline.tf b/datasets/google_dei/_terraform/diversity_annual_report_pipeline.tf new file mode 100644 index 000000000..fd7862e1c --- /dev/null +++ b/datasets/google_dei/_terraform/diversity_annual_report_pipeline.tf @@ -0,0 +1,216 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +resource "google_bigquery_table" "dar_intersectional_attrition" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_intersectional_attrition" + + description = "This table contains the attrition index score of Googlers in the U.S. cut by race and gender combined. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_intersectional_attrition-table_id" { + value = google_bigquery_table.dar_intersectional_attrition.table_id +} + +output "bigquery_table-dar_intersectional_attrition-id" { + value = google_bigquery_table.dar_intersectional_attrition.id +} + +resource "google_bigquery_table" "dar_intersectional_hiring" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_intersectional_hiring" + + description = "This table contains the hiring breakdown of Googlers in the U.S. cut by race and gender combined. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_intersectional_hiring-table_id" { + value = google_bigquery_table.dar_intersectional_hiring.table_id +} + +output "bigquery_table-dar_intersectional_hiring-id" { + value = google_bigquery_table.dar_intersectional_hiring.id +} + +resource "google_bigquery_table" "dar_intersectional_representation" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_intersectional_representation" + + description = "This table contains the representation of Googlers in the U.S. cut by race and gender combined. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_intersectional_representation-table_id" { + value = google_bigquery_table.dar_intersectional_representation.table_id +} + +output "bigquery_table-dar_intersectional_representation-id" { + value = google_bigquery_table.dar_intersectional_representation.id +} + +resource "google_bigquery_table" "dar_non_intersectional_representation" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_non_intersectional_representation" + + description = "This table contains the representation of Googlers in the U.S. cut by race and gender separately and the representation of global Googlers cut by gender. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_non_intersectional_representation-table_id" { + value = google_bigquery_table.dar_non_intersectional_representation.table_id +} + +output "bigquery_table-dar_non_intersectional_representation-id" { + value = google_bigquery_table.dar_non_intersectional_representation.id +} + +resource "google_bigquery_table" "dar_non_intersectional_attrition" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_non_intersectional_attrition" + + description = "This table contains the attrition index score of Googlers in the U.S. cut by race and gender separately and the attrition index score of global Googlers cut by gender. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_non_intersectional_attrition-table_id" { + value = google_bigquery_table.dar_non_intersectional_attrition.table_id +} + +output "bigquery_table-dar_non_intersectional_attrition-id" { + value = google_bigquery_table.dar_non_intersectional_attrition.id +} + +resource "google_bigquery_table" "dar_non_intersectional_hiring" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_non_intersectional_hiring" + + description = "This table contains the hiring breakdown of Googlers in the U.S. cut by race and gender separately and the hiring breakdown of global Googlers cut by gender. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_non_intersectional_hiring-table_id" { + value = google_bigquery_table.dar_non_intersectional_hiring.table_id +} + +output "bigquery_table-dar_non_intersectional_hiring-id" { + value = google_bigquery_table.dar_non_intersectional_hiring.id +} + +resource "google_bigquery_table" "dar_region_non_intersectional_attrition" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_region_non_intersectional_attrition" + + description = "This table contains the attrition index score of Googlers in the regions (EMEA, APAC, and the Americas) cut by gender. “Americas” includes all countries in North and South America in which we operate, excluding the U.S. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_region_non_intersectional_attrition-table_id" { + value = google_bigquery_table.dar_region_non_intersectional_attrition.table_id +} + +output "bigquery_table-dar_region_non_intersectional_attrition-id" { + value = google_bigquery_table.dar_region_non_intersectional_attrition.id +} + +resource "google_bigquery_table" "dar_region_non_intersectional_hiring" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_region_non_intersectional_hiring" + + description = "This table contains the hiring breakdown of Googlers in the regions (EMEA, APAC, and the Americas) cut by gender. “Americas” includes all countries in North and South America in which we operate, excluding the U.S. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_region_non_intersectional_hiring-table_id" { + value = google_bigquery_table.dar_region_non_intersectional_hiring.table_id +} + +output "bigquery_table-dar_region_non_intersectional_hiring-id" { + value = google_bigquery_table.dar_region_non_intersectional_hiring.id +} + +resource "google_bigquery_table" "dar_region_non_intersectional_representation" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_region_non_intersectional_representation" + + description = "This table contains the representation of Googlers in the regions (EMEA, APAC, and the Americas) cut by race and gender. “Americas” includes all countries in North and South America in which we operate, excluding the U.S. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_region_non_intersectional_representation-table_id" { + value = google_bigquery_table.dar_region_non_intersectional_representation.table_id +} + +output "bigquery_table-dar_region_non_intersectional_representation-id" { + value = google_bigquery_table.dar_region_non_intersectional_representation.id +} + +resource "google_bigquery_table" "dar_self_id" { + project = var.project_id + dataset_id = "google_dei" + table_id = "dar_self_id" + + description = "This table contains the representation of Googlers globally who identify as LGBTQ+, members of the military or veterans, people with disabilities, or non-binary genders. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + + depends_on = [ + google_bigquery_dataset.google_dei + ] +} + +output "bigquery_table-dar_self_id-table_id" { + value = google_bigquery_table.dar_self_id.table_id +} + +output "bigquery_table-dar_self_id-id" { + value = google_bigquery_table.dar_self_id.id +} diff --git a/datasets/google_dei/_terraform/google_dei_dataset.tf b/datasets/google_dei/_terraform/google_dei_dataset.tf new file mode 100644 index 000000000..382964bee --- /dev/null +++ b/datasets/google_dei/_terraform/google_dei_dataset.tf @@ -0,0 +1,36 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +resource "google_bigquery_dataset" "google_dei" { + dataset_id = "google_dei" + project = var.project_id + description = "The diversity annual report from Google provides data on the representation, hiring, and retention of employees in our company including race and gender demographics." +} + +output "bigquery_dataset-google_dei-dataset_id" { + value = google_bigquery_dataset.google_dei.dataset_id +} + +resource "google_storage_bucket" "ggl-dei" { + name = "${var.bucket_name_prefix}-ggl-dei" + force_destroy = true + uniform_bucket_level_access = true +} + +output "storage_bucket-ggl-dei-name" { + value = google_storage_bucket.ggl-dei.name +} diff --git a/datasets/google_dei/_terraform/google_diversity_dataset.tf b/datasets/google_dei/_terraform/google_diversity_dataset.tf new file mode 100644 index 000000000..10e01565b --- /dev/null +++ b/datasets/google_dei/_terraform/google_diversity_dataset.tf @@ -0,0 +1,25 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +resource "google_bigquery_dataset" "google_diversity" { + dataset_id = "google_diversity" + project = var.project_id +} + +output "bigquery_dataset-google_diversity-dataset_id" { + value = google_bigquery_dataset.google_diversity.dataset_id +} diff --git a/datasets/google_dei/_terraform/provider.tf b/datasets/google_dei/_terraform/provider.tf new file mode 100644 index 000000000..23ab87dcd --- /dev/null +++ b/datasets/google_dei/_terraform/provider.tf @@ -0,0 +1,28 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +provider "google" { + project = var.project_id + impersonate_service_account = var.impersonating_acct + region = var.region +} + +data "google_client_openid_userinfo" "me" {} + +output "impersonating-account" { + value = data.google_client_openid_userinfo.me.email +} diff --git a/datasets/google_dei/_terraform/variables.tf b/datasets/google_dei/_terraform/variables.tf new file mode 100644 index 000000000..c3ec7c506 --- /dev/null +++ b/datasets/google_dei/_terraform/variables.tf @@ -0,0 +1,23 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +variable "project_id" {} +variable "bucket_name_prefix" {} +variable "impersonating_acct" {} +variable "region" {} +variable "env" {} + diff --git a/datasets/google_dei/dataset.yaml b/datasets/google_dei/dataset.yaml new file mode 100644 index 000000000..4b3883801 --- /dev/null +++ b/datasets/google_dei/dataset.yaml @@ -0,0 +1,30 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dataset: + name: google_dei + + friendly_name: ~ + description: "Google Diversity, Equity, and Inclusion (DEI)" + dataset_sources: ~ + terms_of_use: ~ + +resources: + - type: bigquery_dataset + dataset_id: google_dei + description: "The diversity annual report from Google provides data on the representation, hiring, and retention of employees in our company including race and gender demographics." + + - type: storage_bucket + name: "ggl-dei" + uniform_bucket_level_access: True diff --git a/datasets/google_dei/diversity_annual_report/diversity_annual_report_dag.py b/datasets/google_dei/diversity_annual_report/diversity_annual_report_dag.py new file mode 100644 index 000000000..f85e1603d --- /dev/null +++ b/datasets/google_dei/diversity_annual_report/diversity_annual_report_dag.py @@ -0,0 +1,660 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from airflow import DAG +from airflow.contrib.operators import gcs_to_bq + +default_args = { + "owner": "Google", + "depends_on_past": False, + "start_date": "2021-05-01", +} + + +with DAG( + dag_id="google_dei.diversity_annual_report", + default_args=default_args, + max_active_runs=1, + schedule_interval="@once", + catchup=False, + default_view="graph", +) as dag: + + # Task to load CSV data to a BigQuery table + load_intersectional_attrition_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_intersectional_attrition_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/intersectional_attrition.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_intersectional_attrition", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "gender_us", + "description": "Gender of Googlers in the U.S.", + "type": "string", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The attrition index score of Googlers in the U.S. who identify as Asian", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_black", + "description": "The attrition index score of Googlers in the U.S. who identify as Black", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_hispanic_latinx", + "description": "The attrition index score of Googlers in the U.S. who identify as Hispanic or Latinx", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_native_american", + "description": "The attrition index score of Googlers in the U.S. who identify as Native American", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_white", + "description": "The attrition index score of Googlers in the U.S. who identify as White", + "type": "integer", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_intersectional_hiring_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_intersectional_hiring_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/intersectional_hiring.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_intersectional_hiring", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "gender_us", + "description": "Gender of Googlers hired in the U.S.", + "type": "string", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The percentage of Googlers hired in the U.S. who identify as Asian", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_black", + "description": "The percentage of Googlers hired in the U.S. who identify as Black", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_hispanic_latinx", + "description": "The percentage of Googlers hired in the U.S. who identify as Hispanic or Latinx", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_native_american", + "description": "The percentage of Googlers hired in the U.S. who identify as Native American", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_white", + "description": "The percentage of Googlers hired in the U.S. who identify as White", + "type": "float", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_intersectional_representation_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_intersectional_representation_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/intersectional_representation.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_intersectional_representation", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "gender_us", + "description": "Gender of Googlers in the U.S.", + "type": "string", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The percentage of Googlers in the U.S. who identify as Asian", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_black", + "description": "The percentage of Googlers in the U.S. who identify as Black", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_hispanic_latinx", + "description": "The percentage of Googlers in the U.S. who identify as Hispanic or Latinx", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_native_american", + "description": "The percentage of Googlers in the U.S. who identify as Native American", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_white", + "description": "The percentage of Googlers in the U.S. who identify as White", + "type": "float", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_non_intersectional_representation_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_non_intersectional_representation_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/non_intersectional_representation.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_non_intersectional_representation", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The percentage of Googlers in the U.S. who identify as Asian", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_black", + "description": "The percentage of Googlers in the U.S. who identify as Black", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_hispanic_latinx", + "description": "The percentage of Googlers in the U.S. who identify as Hispanic or Latinx", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_native_american", + "description": "The percentage of Googlers in the U.S. who identify as Native American", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_white", + "description": "The percentage of Googlers in the U.S. who identify as White", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_us_female", + "description": "The percentage of Googlers in the U.S. who identify as female", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_us_male", + "description": "The percentage of Googlers in the U.S. who identify as male", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_global_female", + "description": "The percentage of global Googlers who identify as female", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_global_male", + "description": "The percentage of global Googlers who identify as male", + "type": "float", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_non_intersectional_attrition_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_non_intersectional_attrition_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/non_intersectional_attrition.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_non_intersectional_attrition", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The attrition index score of Googlers in the U.S. who identify as Asian", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_black", + "description": "The attrition index score of Googlers in the U.S. who identify as Black", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_hispanic_latinx", + "description": "The attrition index score of Googlers in the U.S. who identify as Hispanic or Latinx", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_native_american", + "description": "The attrition index score of Googlers in the U.S. who identify as Native American", + "type": "integer", + "mode": "nullable", + }, + { + "name": "race_white", + "description": "The attrition index score of Googlers in the U.S. who identify as White", + "type": "integer", + "mode": "nullable", + }, + { + "name": "gender_us_female", + "description": "The attrition index score of Googlers in the U.S. who are female", + "type": "integer", + "mode": "nullable", + }, + { + "name": "gender_us_male", + "description": "The attrition index score of Googlers in the U.S. who are male", + "type": "integer", + "mode": "nullable", + }, + { + "name": "gender_global_female", + "description": "The attrition index score of global Googlers who are female", + "type": "integer", + "mode": "nullable", + }, + { + "name": "gender_global_male", + "description": "The attrition index score of global Googlers who are male", + "type": "integer", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_non_intersectional_hiring_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_non_intersectional_hiring_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/non_intersectional_hiring.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_non_intersectional_hiring", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The percentage of Googlers hired in the U.S. who identify as Asian", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_black", + "description": "The percentage of Googlers hired in the U.S. who identify as Black", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_hispanic_latinx", + "description": "The percentage of Googlers hired in the U.S. who identify as Hispanic or Latinx", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_native_american", + "description": "The percentage of Googlers hired in the U.S. who identify as Native American", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_white", + "description": "The percentage of Googlers hired in the U.S. who identify as White", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_us_female", + "description": "The percentage of Googlers hired in the U.S. who are female", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_us_male", + "description": "The percentage of Googlers hired in the U.S. who are male", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_global_female", + "description": "The percentage of global Googlers hired who are female", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_global_male", + "description": "The percentage of global Googlers hired who are male", + "type": "float", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_region_non_intersectional_attrition_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_region_non_intersectional_attrition_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/region_non_intersectional_attrition.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_region_non_intersectional_attrition", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "region", + "description": "Region", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "gender_female", + "description": "The attrition index score of Googlers in the region who are female", + "type": "integer", + "mode": "nullable", + }, + { + "name": "gender_male", + "description": "The attrition index score of Googlers in the region who are male", + "type": "integer", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_region_non_intersectional_hiring_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_region_non_intersectional_hiring_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/region_non_intersectional_hiring.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_region_non_intersectional_hiring", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "region", + "description": "Region", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "gender_female", + "description": "The percentage of Googlers in the region who are female", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_male", + "description": "The percentage of Googlers in the region who are male", + "type": "float", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_region_non_intersectional_representation_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_region_non_intersectional_representation_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/region_non_intersectional_representation.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_region_non_intersectional_representation", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Overall and sub-categories", + "type": "string", + "mode": "required", + }, + { + "name": "region", + "description": "Region", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "race_asian", + "description": "The percentage of Googlers in the region who identify as Asian", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_black_african", + "description": "The percentage of Googlers in the region who identify as Black African", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_hispanic_latino_latinx", + "description": "The percentage of Googlers in the region who identify as Hispanic or Latino or Latinx", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_indigenous", + "description": "The percentage of Googlers in the region who identify as Indigenous", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_mena", + "description": "The percentage of Googlers in the region who identify as Middle Eastern or North African", + "type": "float", + "mode": "nullable", + }, + { + "name": "race_white_european", + "description": "The percentage of Googlers in the region who identify as White European", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_female", + "description": "The percentage of Googlers in the region who are female", + "type": "float", + "mode": "nullable", + }, + { + "name": "gender_male", + "description": "The percentage of Googlers in the region who are male", + "type": "float", + "mode": "nullable", + }, + ], + ) + + # Task to load CSV data to a BigQuery table + load_self_id_to_bq = gcs_to_bq.GoogleCloudStorageToBigQueryOperator( + task_id="load_self_id_to_bq", + bucket="{{ var.json.google_dei.storage_bucket }}", + source_objects=["DAR/self_id.csv"], + source_format="CSV", + destination_project_dataset_table="google_dei.dar_self_id", + skip_leading_rows=1, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "workforce", + "description": "Self-identification category. lgbtq: Global Googlers who self-identified as LGBQ+ and/or Trans+; disability: Global Googlers who self-identified as having a disability; military: Global Googlers who self-identified as being or having been members of the military; nonbinary: Global Googlers who self-identified as non-binary", + "type": "string", + "mode": "required", + }, + { + "name": "report_year", + "description": "The year the report was published", + "type": "integer", + "mode": "required", + }, + { + "name": "global", + "description": 'The percentage of Googlers who identify as being part of the self-identification category (i.e., "workforce" type)', + "type": "float", + "mode": "nullable", + }, + ], + ) + + load_intersectional_attrition_to_bq + load_intersectional_hiring_to_bq + load_intersectional_representation_to_bq + load_non_intersectional_attrition_to_bq + load_non_intersectional_hiring_to_bq + load_non_intersectional_representation_to_bq + load_region_non_intersectional_attrition_to_bq + load_region_non_intersectional_hiring_to_bq + load_region_non_intersectional_representation_to_bq + load_self_id_to_bq diff --git a/datasets/google_dei/diversity_annual_report/pipeline.yaml b/datasets/google_dei/diversity_annual_report/pipeline.yaml new file mode 100644 index 000000000..825bd0c4d --- /dev/null +++ b/datasets/google_dei/diversity_annual_report/pipeline.yaml @@ -0,0 +1,534 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +resources: + - type: bigquery_table + table_id: dar_intersectional_attrition + description: "This table contains the attrition index score of Googlers in the U.S. cut by race and gender combined. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_intersectional_hiring + description: "This table contains the hiring breakdown of Googlers in the U.S. cut by race and gender combined. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_intersectional_representation + description: "This table contains the representation of Googlers in the U.S. cut by race and gender combined. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_non_intersectional_representation + description: "This table contains the representation of Googlers in the U.S. cut by race and gender separately and the representation of global Googlers cut by gender. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_non_intersectional_attrition + description: "This table contains the attrition index score of Googlers in the U.S. cut by race and gender separately and the attrition index score of global Googlers cut by gender. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_non_intersectional_hiring + description: "This table contains the hiring breakdown of Googlers in the U.S. cut by race and gender separately and the hiring breakdown of global Googlers cut by gender. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_region_non_intersectional_attrition + description: "This table contains the attrition index score of Googlers in the regions (EMEA, APAC, and the Americas) cut by gender. “Americas” includes all countries in North and South America in which we operate, excluding the U.S. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_region_non_intersectional_hiring + description: "This table contains the hiring breakdown of Googlers in the regions (EMEA, APAC, and the Americas) cut by gender. “Americas” includes all countries in North and South America in which we operate, excluding the U.S. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_region_non_intersectional_representation + description: "This table contains the representation of Googlers in the regions (EMEA, APAC, and the Americas) cut by race and gender. “Americas” includes all countries in North and South America in which we operate, excluding the U.S. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + + - type: bigquery_table + table_id: dar_self_id + description: "This table contains the representation of Googlers globally who identify as LGBTQ+, members of the military or veterans, people with disabilities, or non-binary genders. Some data may be intentionally redacted due to security and privacy restrictions regarding smaller n-counts. In those cases, the data is displayed as a null value." + deletion_protection: False + +dag: + initialize: + dag_id: diversity_annual_report + default_args: + owner: "Google" + depends_on_past: False + start_date: "2021-05-01" + max_active_runs: 1 + schedule_interval: "@once" + catchup: False + default_view: graph + + tasks: + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_intersectional_attrition_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/intersectional_attrition.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_intersectional_attrition" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "gender_us" + description: "Gender of Googlers in the U.S." + type: "string" + mode: "required" + - name: "race_asian" + description: "The attrition index score of Googlers in the U.S. who identify as Asian" + type: "integer" + mode: "nullable" + - name: "race_black" + description: "The attrition index score of Googlers in the U.S. who identify as Black" + type: "integer" + mode: "nullable" + - name: "race_hispanic_latinx" + description: "The attrition index score of Googlers in the U.S. who identify as Hispanic or Latinx" + type: "integer" + mode: "nullable" + - name: "race_native_american" + description: "The attrition index score of Googlers in the U.S. who identify as Native American" + type: "integer" + mode: "nullable" + - name: "race_white" + description: "The attrition index score of Googlers in the U.S. who identify as White" + type: "integer" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_intersectional_hiring_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/intersectional_hiring.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_intersectional_hiring" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "gender_us" + description: "Gender of Googlers hired in the U.S." + type: "string" + mode: "required" + - name: "race_asian" + description: "The percentage of Googlers hired in the U.S. who identify as Asian" + type: "float" + mode: "nullable" + - name: "race_black" + description: "The percentage of Googlers hired in the U.S. who identify as Black" + type: "float" + mode: "nullable" + - name: "race_hispanic_latinx" + description: "The percentage of Googlers hired in the U.S. who identify as Hispanic or Latinx" + type: "float" + mode: "nullable" + - name: "race_native_american" + description: "The percentage of Googlers hired in the U.S. who identify as Native American" + type: "float" + mode: "nullable" + - name: "race_white" + description: "The percentage of Googlers hired in the U.S. who identify as White" + type: "float" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_intersectional_representation_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/intersectional_representation.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_intersectional_representation" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "gender_us" + description: "Gender of Googlers in the U.S." + type: "string" + mode: "required" + - name: "race_asian" + description: "The percentage of Googlers in the U.S. who identify as Asian" + type: "float" + mode: "nullable" + - name: "race_black" + description: "The percentage of Googlers in the U.S. who identify as Black" + type: "float" + mode: "nullable" + - name: "race_hispanic_latinx" + description: "The percentage of Googlers in the U.S. who identify as Hispanic or Latinx" + type: "float" + mode: "nullable" + - name: "race_native_american" + description: "The percentage of Googlers in the U.S. who identify as Native American" + type: "float" + mode: "nullable" + - name: "race_white" + description: "The percentage of Googlers in the U.S. who identify as White" + type: "float" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_non_intersectional_representation_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/non_intersectional_representation.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_non_intersectional_representation" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "race_asian" + description: "The percentage of Googlers in the U.S. who identify as Asian" + type: "float" + mode: "nullable" + - name: "race_black" + description: "The percentage of Googlers in the U.S. who identify as Black" + type: "float" + mode: "nullable" + - name: "race_hispanic_latinx" + description: "The percentage of Googlers in the U.S. who identify as Hispanic or Latinx" + type: "float" + mode: "nullable" + - name: "race_native_american" + description: "The percentage of Googlers in the U.S. who identify as Native American" + type: "float" + mode: "nullable" + - name: "race_white" + description: "The percentage of Googlers in the U.S. who identify as White" + type: "float" + mode: "nullable" + - name: "gender_us_female" + description: "The percentage of Googlers in the U.S. who identify as female" + type: "float" + mode: "nullable" + - name: "gender_us_male" + description: "The percentage of Googlers in the U.S. who identify as male" + type: "float" + mode: "nullable" + - name: "gender_global_female" + description: "The percentage of global Googlers who identify as female" + type: "float" + mode: "nullable" + - name: "gender_global_male" + description: "The percentage of global Googlers who identify as male" + type: "float" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_non_intersectional_attrition_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/non_intersectional_attrition.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_non_intersectional_attrition" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "race_asian" + description: "The attrition index score of Googlers in the U.S. who identify as Asian" + type: "integer" + mode: "nullable" + - name: "race_black" + description: "The attrition index score of Googlers in the U.S. who identify as Black" + type: "integer" + mode: "nullable" + - name: "race_hispanic_latinx" + description: "The attrition index score of Googlers in the U.S. who identify as Hispanic or Latinx" + type: "integer" + mode: "nullable" + - name: "race_native_american" + description: "The attrition index score of Googlers in the U.S. who identify as Native American" + type: "integer" + mode: "nullable" + - name: "race_white" + description: "The attrition index score of Googlers in the U.S. who identify as White" + type: "integer" + mode: "nullable" + - name: "gender_us_female" + description: "The attrition index score of Googlers in the U.S. who are female" + type: "integer" + mode: "nullable" + - name: "gender_us_male" + description: "The attrition index score of Googlers in the U.S. who are male" + type: "integer" + mode: "nullable" + - name: "gender_global_female" + description: "The attrition index score of global Googlers who are female" + type: "integer" + mode: "nullable" + - name: "gender_global_male" + description: "The attrition index score of global Googlers who are male" + type: "integer" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_non_intersectional_hiring_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/non_intersectional_hiring.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_non_intersectional_hiring" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "race_asian" + description: "The percentage of Googlers hired in the U.S. who identify as Asian" + type: "float" + mode: "nullable" + - name: "race_black" + description: "The percentage of Googlers hired in the U.S. who identify as Black" + type: "float" + mode: "nullable" + - name: "race_hispanic_latinx" + description: "The percentage of Googlers hired in the U.S. who identify as Hispanic or Latinx" + type: "float" + mode: "nullable" + - name: "race_native_american" + description: "The percentage of Googlers hired in the U.S. who identify as Native American" + type: "float" + mode: "nullable" + - name: "race_white" + description: "The percentage of Googlers hired in the U.S. who identify as White" + type: "float" + mode: "nullable" + - name: "gender_us_female" + description: "The percentage of Googlers hired in the U.S. who are female" + type: "float" + mode: "nullable" + - name: "gender_us_male" + description: "The percentage of Googlers hired in the U.S. who are male" + type: "float" + mode: "nullable" + - name: "gender_global_female" + description: "The percentage of global Googlers hired who are female" + type: "float" + mode: "nullable" + - name: "gender_global_male" + description: "The percentage of global Googlers hired who are male" + type: "float" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_region_non_intersectional_attrition_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/region_non_intersectional_attrition.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_region_non_intersectional_attrition" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "region" + description: "Region" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "gender_female" + description: "The attrition index score of Googlers in the region who are female" + type: "integer" + mode: "nullable" + - name: "gender_male" + description: "The attrition index score of Googlers in the region who are male" + type: "integer" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_region_non_intersectional_hiring_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/region_non_intersectional_hiring.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_region_non_intersectional_hiring" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "region" + description: "Region" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "gender_female" + description: "The percentage of Googlers in the region who are female" + type: "float" + mode: "nullable" + - name: "gender_male" + description: "The percentage of Googlers in the region who are male" + type: "float" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_region_non_intersectional_representation_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/region_non_intersectional_representation.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_region_non_intersectional_representation" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Overall and sub-categories" + type: "string" + mode: "required" + - name: "region" + description: "Region" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "race_asian" + description: "The percentage of Googlers in the region who identify as Asian" + type: "float" + mode: "nullable" + - name: "race_black_african" + description: "The percentage of Googlers in the region who identify as Black African" + type: "float" + mode: "nullable" + - name: "race_hispanic_latino_latinx" + description: "The percentage of Googlers in the region who identify as Hispanic or Latino or Latinx" + type: "float" + mode: "nullable" + - name: "race_indigenous" + description: "The percentage of Googlers in the region who identify as Indigenous" + type: "float" + mode: "nullable" + - name: "race_mena" + description: "The percentage of Googlers in the region who identify as Middle Eastern or North African" + type: "float" + mode: "nullable" + - name: "race_white_european" + description: "The percentage of Googlers in the region who identify as White European" + type: "float" + mode: "nullable" + - name: "gender_female" + description: "The percentage of Googlers in the region who are female" + type: "float" + mode: "nullable" + - name: "gender_male" + description: "The percentage of Googlers in the region who are male" + type: "float" + mode: "nullable" + + - operator: "GoogleCloudStorageToBigQueryOperator" + description: "Task to load CSV data to a BigQuery table" + args: + task_id: "load_self_id_to_bq" + bucket: "{{ var.json.google_dei.storage_bucket }}" + source_objects: ["DAR/self_id.csv"] + source_format: "CSV" + destination_project_dataset_table: "google_dei.dar_self_id" + skip_leading_rows: 1 + write_disposition: "WRITE_TRUNCATE" + schema_fields: + - name: "workforce" + description: "Self-identification category. lgbtq: Global Googlers who self-identified as LGBQ+ and/or Trans+; disability: Global Googlers who self-identified as having a disability; military: Global Googlers who self-identified as being or having been members of the military; nonbinary: Global Googlers who self-identified as non-binary" + type: "string" + mode: "required" + - name: "report_year" + description: "The year the report was published" + type: "integer" + mode: "required" + - name: "global" + description: "The percentage of Googlers who identify as being part of the self-identification category (i.e., \"workforce\" type)" + type: "float" + mode: "nullable" + + graph_paths: + - "load_intersectional_attrition_to_bq" + - "load_intersectional_hiring_to_bq" + - "load_intersectional_representation_to_bq" + - "load_non_intersectional_attrition_to_bq" + - "load_non_intersectional_hiring_to_bq" + - "load_non_intersectional_representation_to_bq" + - "load_region_non_intersectional_attrition_to_bq" + - "load_region_non_intersectional_hiring_to_bq" + - "load_region_non_intersectional_representation_to_bq" + - "load_self_id_to_bq"