diff --git a/datasets/san_francisco_bikeshare_stations/_images/run_csv_transform_kub/Dockerfile b/datasets/san_francisco_bikeshare/_images/bikeshare_station_info/Dockerfile similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_images/run_csv_transform_kub/Dockerfile rename to datasets/san_francisco_bikeshare/_images/bikeshare_station_info/Dockerfile diff --git a/datasets/san_francisco_bikeshare_stations/_images/run_csv_transform_kub/csv_transform.py b/datasets/san_francisco_bikeshare/_images/bikeshare_station_info/csv_transform.py similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_images/run_csv_transform_kub/csv_transform.py rename to datasets/san_francisco_bikeshare/_images/bikeshare_station_info/csv_transform.py diff --git a/datasets/san_francisco_bikeshare_stations/_images/run_csv_transform_kub/requirements.txt b/datasets/san_francisco_bikeshare/_images/bikeshare_station_info/requirements.txt similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_images/run_csv_transform_kub/requirements.txt rename to datasets/san_francisco_bikeshare/_images/bikeshare_station_info/requirements.txt diff --git a/datasets/san_francisco_bikeshare_status/_images/run_csv_transform_kub/Dockerfile b/datasets/san_francisco_bikeshare/_images/bikeshare_station_status/Dockerfile similarity index 100% rename from datasets/san_francisco_bikeshare_status/_images/run_csv_transform_kub/Dockerfile rename to datasets/san_francisco_bikeshare/_images/bikeshare_station_status/Dockerfile diff --git a/datasets/san_francisco_bikeshare_status/_images/run_csv_transform_kub/csv_transform.py b/datasets/san_francisco_bikeshare/_images/bikeshare_station_status/csv_transform.py similarity index 100% rename from datasets/san_francisco_bikeshare_status/_images/run_csv_transform_kub/csv_transform.py rename to datasets/san_francisco_bikeshare/_images/bikeshare_station_status/csv_transform.py diff --git a/datasets/san_francisco_bikeshare_status/_images/run_csv_transform_kub/requirements.txt b/datasets/san_francisco_bikeshare/_images/bikeshare_station_status/requirements.txt similarity index 100% rename from datasets/san_francisco_bikeshare_status/_images/run_csv_transform_kub/requirements.txt rename to datasets/san_francisco_bikeshare/_images/bikeshare_station_status/requirements.txt diff --git a/datasets/san_francisco_bikeshare/_terraform/bikeshare_station_info_pipeline.tf b/datasets/san_francisco_bikeshare/_terraform/bikeshare_station_info_pipeline.tf new file mode 100644 index 000000000..fe30c6441 --- /dev/null +++ b/datasets/san_francisco_bikeshare/_terraform/bikeshare_station_info_pipeline.tf @@ -0,0 +1,39 @@ +/** + * 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" "san_francisco_bikeshare_bikeshare_station_info" { + project = var.project_id + dataset_id = "san_francisco_bikeshare" + table_id = "bikeshare_station_info" + + + + + + + depends_on = [ + google_bigquery_dataset.san_francisco_bikeshare + ] +} + +output "bigquery_table-san_francisco_bikeshare_bikeshare_station_info-table_id" { + value = google_bigquery_table.san_francisco_bikeshare_bikeshare_station_info.table_id +} + +output "bigquery_table-san_francisco_bikeshare_bikeshare_station_info-id" { + value = google_bigquery_table.san_francisco_bikeshare_bikeshare_station_info.id +} diff --git a/datasets/san_francisco_bikeshare/_terraform/bikeshare_station_status_pipeline.tf b/datasets/san_francisco_bikeshare/_terraform/bikeshare_station_status_pipeline.tf new file mode 100644 index 000000000..19af81ec7 --- /dev/null +++ b/datasets/san_francisco_bikeshare/_terraform/bikeshare_station_status_pipeline.tf @@ -0,0 +1,39 @@ +/** + * 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" "san_francisco_bikeshare_bikeshare_station_status" { + project = var.project_id + dataset_id = "san_francisco_bikeshare" + table_id = "bikeshare_station_status" + + description = "san_francisco_bikeshare_station_statusspc" + + + + + depends_on = [ + google_bigquery_dataset.san_francisco_bikeshare + ] +} + +output "bigquery_table-san_francisco_bikeshare_bikeshare_station_status-table_id" { + value = google_bigquery_table.san_francisco_bikeshare_bikeshare_station_status.table_id +} + +output "bigquery_table-san_francisco_bikeshare_bikeshare_station_status-id" { + value = google_bigquery_table.san_francisco_bikeshare_bikeshare_station_status.id +} diff --git a/datasets/san_francisco_bikeshare_stations/_terraform/bikeshare_stations_pipeline.tf b/datasets/san_francisco_bikeshare/_terraform/bikeshare_stations_pipeline.tf similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_terraform/bikeshare_stations_pipeline.tf rename to datasets/san_francisco_bikeshare/_terraform/bikeshare_stations_pipeline.tf diff --git a/datasets/san_francisco_bikeshare_stations/_terraform/provider.tf b/datasets/san_francisco_bikeshare/_terraform/provider.tf similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_terraform/provider.tf rename to datasets/san_francisco_bikeshare/_terraform/provider.tf diff --git a/datasets/san_francisco_bikeshare/_terraform/san_francisco_bikeshare_dataset.tf b/datasets/san_francisco_bikeshare/_terraform/san_francisco_bikeshare_dataset.tf new file mode 100644 index 000000000..056ad5084 --- /dev/null +++ b/datasets/san_francisco_bikeshare/_terraform/san_francisco_bikeshare_dataset.tf @@ -0,0 +1,26 @@ +/** + * 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" "san_francisco_bikeshare" { + dataset_id = "san_francisco_bikeshare" + project = var.project_id + description = "san_francisco_bikeshare" +} + +output "bigquery_dataset-san_francisco_bikeshare-dataset_id" { + value = google_bigquery_dataset.san_francisco_bikeshare.dataset_id +} diff --git a/datasets/san_francisco_bikeshare_stations/_terraform/san_francisco_bikeshare_stations_dataset.tf b/datasets/san_francisco_bikeshare/_terraform/san_francisco_bikeshare_stations_dataset.tf similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_terraform/san_francisco_bikeshare_stations_dataset.tf rename to datasets/san_francisco_bikeshare/_terraform/san_francisco_bikeshare_stations_dataset.tf diff --git a/datasets/san_francisco_bikeshare_stations/_terraform/variables.tf b/datasets/san_francisco_bikeshare/_terraform/variables.tf similarity index 100% rename from datasets/san_francisco_bikeshare_stations/_terraform/variables.tf rename to datasets/san_francisco_bikeshare/_terraform/variables.tf diff --git a/datasets/san_francisco_bikeshare/bikeshare_station_info/bikeshare_station_info_dag.py b/datasets/san_francisco_bikeshare/bikeshare_station_info/bikeshare_station_info_dag.py new file mode 100644 index 000000000..d5a3e184e --- /dev/null +++ b/datasets/san_francisco_bikeshare/bikeshare_station_info/bikeshare_station_info_dag.py @@ -0,0 +1,159 @@ +# 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.providers.cncf.kubernetes.operators import kubernetes_pod +from airflow.providers.google.cloud.transfers import gcs_to_bigquery + +default_args = { + "owner": "Google", + "depends_on_past": False, + "start_date": "2021-03-01", +} + + +with DAG( + dag_id="san_francisco_bikeshare.bikeshare_station_info", + default_args=default_args, + max_active_runs=1, + schedule_interval="@daily", + catchup=False, + default_view="graph", +) as dag: + + # Run CSV transform within kubernetes pod + transform_csv = kubernetes_pod.KubernetesPodOperator( + task_id="transform_csv", + name="bikeshare_station_info", + namespace="default", + affinity={ + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "cloud.google.com/gke-nodepool", + "operator": "In", + "values": ["pool-e2-standard-4"], + } + ] + } + ] + } + } + }, + image_pull_policy="Always", + image="{{ var.json.san_francisco_bikeshare.container_registry.bikeshare_station_info }}", + env_vars={ + "SOURCE_URL_JSON": "https://gbfs.baywheels.com/gbfs/fr/station_information", + "SOURCE_FILE": "files/data.csv", + "TARGET_FILE": "files/data_output.csv", + "CHUNKSIZE": "750000", + "TARGET_GCS_BUCKET": "{{ var.value.composer_bucket }}", + "TARGET_GCS_PATH": "data/san_francisco_bikeshare/bikeshare_station_info/data_output.csv", + }, + resources={"limit_memory": "8G", "limit_cpu": "3"}, + ) + + # Task to load CSV data to a BigQuery table + load_to_bq = gcs_to_bigquery.GCSToBigQueryOperator( + task_id="load_to_bq", + bucket="{{ var.value.composer_bucket }}", + source_objects=[ + "data/san_francisco_bikeshare/bikeshare_station_info/data_output.csv" + ], + source_format="CSV", + destination_project_dataset_table="san_francisco_bikeshare.bikeshare_station_info", + skip_leading_rows=1, + allow_quoted_newlines=True, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "station_id", + "type": "INTEGER", + "description": "Unique identifier of a station.", + "mode": "REQUIRED", + }, + { + "name": "name", + "type": "STRING", + "description": "Public name of the station", + "mode": "REQUIRED", + }, + { + "name": "short_name", + "type": "STRING", + "description": "Short name or other type of identifier, as used by the data publisher", + "mode": "NULLABLE", + }, + { + "name": "lat", + "type": "FLOAT", + "description": "The latitude of station. The field value must be a valid WGS 84 latitude in decimal degrees format. See: http://en.wikipedia.org/wiki/World_Geodetic_System, https://en.wikipedia.org/wiki/Decimal_degrees", + "mode": "REQUIRED", + }, + { + "name": "lon", + "type": "FLOAT", + "description": "The longitude of station. The field value must be a valid WGS 84 longitude in decimal degrees format. See: http://en.wikipedia.org/wiki/World_Geodetic_System, https://en.wikipedia.org/wiki/Decimal_degrees", + "mode": "REQUIRED", + }, + { + "name": "region_id", + "type": "INTEGER", + "description": "ID of the region where station is located", + "mode": "NULLABLE", + }, + { + "name": "rental_methods", + "type": "STRING", + "description": "Array of enumerables containing the payment methods accepted at this station. Current valid values (in CAPS) are: KEY (i.e. operator issued bike key / fob / card) CREDITCARD PAYPASS APPLEPAY ANDROIDPAY TRANSITCARD ACCOUNTNUMBER PHONE This list is intended to be as comprehensive at the time of publication as possible but is subject to change, as defined in File Requirements above", + "mode": "NULLABLE", + }, + { + "name": "capacity", + "type": "INTEGER", + "description": "Number of total docking points installed at this station, both available and unavailable", + "mode": "NULLABLE", + }, + { + "name": "external_id", + "type": "STRING", + "description": "", + "mode": "NULLABLE", + }, + { + "name": "eightd_has_key_dispenser", + "type": "BOOLEAN", + "description": "", + "mode": "NULLABLE", + }, + { + "name": "has_kiosk", + "type": "BOOLEAN", + "description": "", + "mode": "NULLABLE", + }, + { + "name": "station_geom", + "type": "GEOGRAPHY", + "description": "", + "mode": "NULLABLE", + }, + ], + ) + + transform_csv >> load_to_bq diff --git a/datasets/san_francisco_bikeshare_stations/bikeshare_stations/bikeshare_stations_dag.py b/datasets/san_francisco_bikeshare/bikeshare_station_info/bikeshare_stations_dag.py similarity index 100% rename from datasets/san_francisco_bikeshare_stations/bikeshare_stations/bikeshare_stations_dag.py rename to datasets/san_francisco_bikeshare/bikeshare_station_info/bikeshare_stations_dag.py diff --git a/datasets/san_francisco_bikeshare_stations/bikeshare_stations/pipeline.yaml b/datasets/san_francisco_bikeshare/bikeshare_station_info/pipeline.yaml similarity index 89% rename from datasets/san_francisco_bikeshare_stations/bikeshare_stations/pipeline.yaml rename to datasets/san_francisco_bikeshare/bikeshare_station_info/pipeline.yaml index 37ee16150..68332cf86 100644 --- a/datasets/san_francisco_bikeshare_stations/bikeshare_stations/pipeline.yaml +++ b/datasets/san_francisco_bikeshare/bikeshare_station_info/pipeline.yaml @@ -16,13 +16,13 @@ resources: - type: bigquery_table - table_id: "bikeshare_stations" - description: "san francisco bikeshare stations" + table_id: "bikeshare_station_info" + description: "" dag: airflow_version: 2 initialize: - dag_id: bikeshare_stations + dag_id: bikeshare_station_info default_args: owner: "Google" depends_on_past: False @@ -40,7 +40,7 @@ dag: args: task_id: "transform_csv" - name: "bikeshare_stations" + name: "bikeshare_station_info" namespace: "default" affinity: nodeAffinity: @@ -52,14 +52,14 @@ dag: values: - "pool-e2-standard-4" image_pull_policy: "Always" - image: "{{ var.json.san_francisco_bikeshare_stations.container_registry.run_csv_transform_kub }}" + image: "{{ var.json.san_francisco_bikeshare.container_registry.bikeshare_station_info }}" env_vars: SOURCE_URL_JSON: "https://gbfs.baywheels.com/gbfs/fr/station_information" SOURCE_FILE: "files/data.csv" TARGET_FILE: "files/data_output.csv" CHUNKSIZE: "750000" TARGET_GCS_BUCKET: "{{ var.value.composer_bucket }}" - TARGET_GCS_PATH: "data/san_francisco_bikeshare_stations/bikeshare_stations/data_output.csv" + TARGET_GCS_PATH: "data/san_francisco_bikeshare/bikeshare_station_info/data_output.csv" resources: limit_memory: "8G" limit_cpu: "3" @@ -70,9 +70,9 @@ dag: args: task_id: "load_to_bq" bucket: "{{ var.value.composer_bucket }}" - source_objects: ["data/san_francisco_bikeshare_stations/bikeshare_stations/data_output.csv"] + source_objects: ["data/san_francisco_bikeshare/bikeshare_station_info/data_output.csv"] source_format: "CSV" - destination_project_dataset_table: "san_francisco.bikeshare_station_info" + destination_project_dataset_table: "san_francisco_bikeshare.bikeshare_station_info" skip_leading_rows: 1 allow_quoted_newlines: True write_disposition: "WRITE_TRUNCATE" diff --git a/datasets/san_francisco_bikeshare/bikeshare_station_status/bikeshare_station_status_dag.py b/datasets/san_francisco_bikeshare/bikeshare_station_status/bikeshare_station_status_dag.py new file mode 100644 index 000000000..b9b23a6e1 --- /dev/null +++ b/datasets/san_francisco_bikeshare/bikeshare_station_status/bikeshare_station_status_dag.py @@ -0,0 +1,153 @@ +# 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.providers.cncf.kubernetes.operators import kubernetes_pod +from airflow.providers.google.cloud.transfers import gcs_to_bigquery + +default_args = { + "owner": "Google", + "depends_on_past": False, + "start_date": "2021-03-01", +} + + +with DAG( + dag_id="san_francisco_bikeshare.bikeshare_station_status", + default_args=default_args, + max_active_runs=1, + schedule_interval="@daily", + catchup=False, + default_view="graph", +) as dag: + + # Run CSV transform within kubernetes pod + transform_csv = kubernetes_pod.KubernetesPodOperator( + task_id="transform_csv", + name="bikeshare_station_status", + namespace="default", + affinity={ + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "cloud.google.com/gke-nodepool", + "operator": "In", + "values": ["pool-e2-standard-4"], + } + ] + } + ] + } + } + }, + image_pull_policy="Always", + image="{{ var.json.san_francisco_bikeshare.container_registry.bikeshare_station_status }}", + env_vars={ + "SOURCE_URL_JSON": "https://gbfs.baywheels.com/gbfs/en/station_status", + "SOURCE_FILE": "files/data.csv", + "TARGET_FILE": "files/data_output.csv", + "CHUNKSIZE": "750000", + "TARGET_GCS_BUCKET": "{{ var.value.composer_bucket }}", + "TARGET_GCS_PATH": "data/san_francisco_bikeshare/bikeshare_station_status/data_output.csv", + }, + resources={"limit_memory": "8G", "limit_cpu": "3"}, + ) + + # Task to load CSV data to a BigQuery table + load_to_bq = gcs_to_bigquery.GCSToBigQueryOperator( + task_id="load_to_bq", + bucket="{{ var.value.composer_bucket }}", + source_objects=[ + "data/san_francisco_bikeshare/bikeshare_station_status/data_output.csv" + ], + source_format="CSV", + destination_project_dataset_table="san_francisco_bikeshare.bikeshare_station_status", + skip_leading_rows=1, + allow_quoted_newlines=True, + write_disposition="WRITE_TRUNCATE", + schema_fields=[ + { + "name": "station_id", + "type": "INTEGER", + "description": "Unique identifier of a station", + "mode": "REQUIRED", + }, + { + "name": "num_bikes_available", + "type": "INTEGER", + "description": "Number of bikes available for rental", + "mode": "REQUIRED", + }, + { + "name": "num_bikes_disabled", + "type": "INTEGER", + "description": "Number of disabled bikes at the station. Vendors who do not want to publicize the number of disabled bikes or docks in their system can opt to omit station capacity (in station_information), num_bikes_disabled and num_docks_disabled. If station capacity is published then broken docks/bikes can be inferred (though not specifically whether the decreased capacity is a broken bike or dock)", + "mode": "NULLABLE", + }, + { + "name": "num_docks_available", + "type": "INTEGER", + "description": "Number of docks accepting bike returns", + "mode": "REQUIRED", + }, + { + "name": "num_docks_disabled", + "type": "INTEGER", + "description": "Number of empty but disabled dock points at the station. This value remains as part of the spec as it is possibly useful during development", + "mode": "NULLABLE", + }, + { + "name": "is_installed", + "type": "BOOLEAN", + "description": "1/0 boolean - is the station currently on the street", + "mode": "REQUIRED", + }, + { + "name": "is_renting", + "type": "BOOLEAN", + "description": "1/0 boolean - is the station currently renting bikes (even if the station is empty, if it is set to allow rentals this value should be 1)", + "mode": "REQUIRED", + }, + { + "name": "is_returning", + "type": "BOOLEAN", + "description": "1/0 boolean - is the station accepting bike returns (if a station is full but would allow a return if it was not full then this value should be 1)", + "mode": "REQUIRED", + }, + { + "name": "last_reported", + "type": "INTEGER", + "description": "Integer POSIX timestamp indicating the last time this station reported its status to the backend", + "mode": "REQUIRED", + }, + { + "name": "num_ebikes_available", + "type": "INTEGER", + "description": "", + "mode": "NULLABLE", + }, + { + "name": "eightd_has_available_keys", + "type": "BOOLEAN", + "description": "", + "mode": "NULLABLE", + }, + ], + ) + + transform_csv >> load_to_bq diff --git a/datasets/san_francisco_bikeshare_status/bikeshare_status/bikeshare_status_dag.py b/datasets/san_francisco_bikeshare/bikeshare_station_status/bikeshare_status_dag.py similarity index 100% rename from datasets/san_francisco_bikeshare_status/bikeshare_status/bikeshare_status_dag.py rename to datasets/san_francisco_bikeshare/bikeshare_station_status/bikeshare_status_dag.py diff --git a/datasets/san_francisco_bikeshare_status/bikeshare_status/pipeline.yaml b/datasets/san_francisco_bikeshare/bikeshare_station_status/pipeline.yaml similarity index 90% rename from datasets/san_francisco_bikeshare_status/bikeshare_status/pipeline.yaml rename to datasets/san_francisco_bikeshare/bikeshare_station_status/pipeline.yaml index 50be3647a..7e1c0e7a1 100644 --- a/datasets/san_francisco_bikeshare_status/bikeshare_status/pipeline.yaml +++ b/datasets/san_francisco_bikeshare/bikeshare_station_status/pipeline.yaml @@ -16,13 +16,13 @@ resources: - type: bigquery_table - table_id: "bikeshare_status" - description: "san_francisco_bikeshare_statusspc" + table_id: "bikeshare_station_status" + description: "san_francisco_bikeshare_station_statusspc" dag: airflow_version: 2 initialize: - dag_id: bikeshare_status + dag_id: bikeshare_station_status default_args: owner: "Google" depends_on_past: False @@ -40,7 +40,7 @@ dag: args: task_id: "transform_csv" - name: "bikeshare_status" + name: "bikeshare_station_status" namespace: "default" affinity: nodeAffinity: @@ -52,14 +52,14 @@ dag: values: - "pool-e2-standard-4" image_pull_policy: "Always" - image: "{{ var.json.san_francisco_bikeshare_status.container_registry.run_csv_transform_kub }}" + image: "{{ var.json.san_francisco_bikeshare.container_registry.bikeshare_station_status }}" env_vars: SOURCE_URL_JSON: "https://gbfs.baywheels.com/gbfs/en/station_status" SOURCE_FILE: "files/data.csv" TARGET_FILE: "files/data_output.csv" CHUNKSIZE: "750000" TARGET_GCS_BUCKET: "{{ var.value.composer_bucket }}" - TARGET_GCS_PATH: "data/san_francisco_bikeshare_status/bikeshare_status/data_output.csv" + TARGET_GCS_PATH: "data/san_francisco_bikeshare/bikeshare_station_status/data_output.csv" resources: limit_memory: "8G" limit_cpu: "3" @@ -70,9 +70,9 @@ dag: args: task_id: "load_to_bq" bucket: "{{ var.value.composer_bucket }}" - source_objects: ["data/san_francisco_bikeshare_status/bikeshare_status/data_output.csv"] + source_objects: ["data/san_francisco_bikeshare/bikeshare_station_status/data_output.csv"] source_format: "CSV" - destination_project_dataset_table: "san_francisco_bikeshare_status.bikeshare_status" + destination_project_dataset_table: "san_francisco_bikeshare.bikeshare_station_status" skip_leading_rows: 1 allow_quoted_newlines: True write_disposition: "WRITE_TRUNCATE" diff --git a/datasets/san_francisco_bikeshare_stations/dataset.yaml b/datasets/san_francisco_bikeshare/dataset.yaml similarity index 83% rename from datasets/san_francisco_bikeshare_stations/dataset.yaml rename to datasets/san_francisco_bikeshare/dataset.yaml index 5f1056234..1a0f5b0d4 100644 --- a/datasets/san_francisco_bikeshare_stations/dataset.yaml +++ b/datasets/san_francisco_bikeshare/dataset.yaml @@ -13,7 +13,7 @@ # limitations under the License. dataset: - name: san_francisco_bikeshare_stations + name: san_francisco_bikeshare friendly_name: ~ description: ~ dataset_sources: ~ @@ -23,5 +23,5 @@ dataset: resources: - type: bigquery_dataset - dataset_id: san_francisco_bikeshare_stations - description: san_francisco_bikeshare_stations + dataset_id: san_francisco_bikeshare + description: san_francisco_bikeshare