diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py index acbecfa84c2..a3ff5d0e6f1 100644 --- a/plugins/bigquery/dbt/adapters/bigquery/connections.py +++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py @@ -594,9 +594,8 @@ def _is_retryable(error): _SANITIZE_LABEL_PATTERN = re.compile(r"[^a-z0-9_-]") -def _sanitize_label(value: str, max_length: int = 63) -> str: +def _sanitize_label(value: str) -> str: """Return a legal value for a BigQuery label.""" value = value.strip().lower() value = _SANITIZE_LABEL_PATTERN.sub("_", value) - value = value[: max_length] return value diff --git a/test/unit/test_bigquery_adapter.py b/test/unit/test_bigquery_adapter.py index 5f317376191..7d42b1b6f64 100644 --- a/test/unit/test_bigquery_adapter.py +++ b/test/unit/test_bigquery_adapter.py @@ -2,6 +2,7 @@ import decimal import json import re +import pytest import unittest from contextlib import contextmanager from requests.exceptions import ConnectionError @@ -23,7 +24,6 @@ from dbt.logger import GLOBAL_LOGGER as logger # noqa from dbt.context.providers import RuntimeConfigObject -import pytest import google.cloud.bigquery from .utils import config_from_parts_or_dicts, inject_adapter, TestAdapterConversions @@ -946,7 +946,6 @@ def test_convert_time_type(self): @pytest.mark.parametrize( ["input", "output"], [ - ("a" * 64, "a" * 63), ("ABC", "abc"), ("a c", "a_c"), ("a ", "a"),