# Cloud Spanner API - Class Google::Cloud::Spanner::DuplicateNameError (v2.36.0)

2.36.0 (latest) 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.1 2.18.1 2.17.0 2.16.1 2.15.0 2.14.0 2.13.0 2.12.1 2.11.0 Reference documentation and code samples for the Cloud Spanner API class Google::Cloud::Spanner::DuplicateNameError.

## DuplicateNameError

Data accessed by name (typically by calling
[Google::Cloud::Spanner::Data#\[\]](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner/latest/Google-Cloud-Spanner-Data#Google__Cloud__Spanner__Data_[]_instance_ "Google::Cloud::Spanner::Data#[] (method)") with a key or calling
[Google::Cloud::Spanner::Data#to_h](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner/latest/Google-Cloud-Spanner-Data#Google__Cloud__Spanner__Data_to_h_instance_ "Google::Cloud::Spanner::Data#to_h (method)")) has more than one occurrence of the
same name. Such data should be accessed by position rather than by name.

## Inherits

- [Google::Cloud::Error](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner/latest/Google-Cloud-Error)