diff --git a/data-science-onramp/data-cleaning/clean.py b/data-science-onramp/data-cleaning/clean.py index 6c2c00a38f2..e4ca26344f7 100644 --- a/data-science-onramp/data-cleaning/clean.py +++ b/data-science-onramp/data-cleaning/clean.py @@ -1,3 +1,18 @@ +# Copyright 2020 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. + + import datetime import re import sys diff --git a/data-science-onramp/data-cleaning/clean_test.py b/data-science-onramp/data-cleaning/clean_test.py index 52271061b1a..75f9a394db5 100644 --- a/data-science-onramp/data-cleaning/clean_test.py +++ b/data-science-onramp/data-cleaning/clean_test.py @@ -1,3 +1,18 @@ +# Copyright 2020 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. + + import os import re import uuid @@ -72,6 +87,11 @@ def setup_and_teardown_table(): job_config = bigquery.LoadJobConfig( autodetect=True, write_disposition="WRITE_TRUNCATE" ) + + # Logging for debugging the flake: + # https://github.com/GoogleCloudPlatform/python-docs-samples/issues/5312 + print(f"df: {df}") + print(f"job_config: {job_config}") operation = bq_client.load_table_from_dataframe(df, BQ_TABLE, job_config=job_config) # Wait for job to complete