GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

Error when attempting to create partitions on large Teradata tables (2B+ rows)

Open
#1,280 4 comments 0 reactions 1 assignee Assigned to @sundar-mudupalli-work View on GitHub
priority: p2
Dominant language
Python
Stars
524
Forks
171
Avg merge
5d 15h
Merged PRs (30d)
4

Description

When creating partitions for a large table in a Teradata to BigQuery migration, the following error was encountered:

teradatasql.OperationalError: [Version 20.0.0.15] [Session 64925450] [Teradata Database] [Error 2616] Numeric overflow occurred during computation

![image](https://github.com/user-attachments/assets/4c01f668-5f3d-4de3-afe4-5bbedbf87acc)

DVT is failing when generating the partitions as it is trying to do count(*) before partition creation.

According to the documentation, a TD integer can only be between -2,147,483,648 and 2,147,483,647. The table in question has 2,234,011,695 rows, which is outside the Integer range(https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/SQL-Data-Types-and-Literals/Numeric-Data-Types/INTEGER-Data-Type).

Suggestion is to change the count check to cast(count(1) as BIGINT) which should resolve the error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.