Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemTablePersistence - Value too long for character type error #716

Open
felixep opened this issue Apr 25, 2024 · 0 comments
Open

SystemTablePersistence - Value too long for character type error #716

felixep opened this issue Apr 25, 2024 · 0 comments

Comments

@felixep
Copy link

felixep commented Apr 25, 2024

Hello team,

I'm getting the following error when I execute the SystemTablePersistence lambda utility:

ERROR] ProgrammingError: {'S': 'ERROR', 'C': 'XX000', 'M': 'Value too long for character type', 'D': '\n -----------------------------------------------\n error: Value too long for character type\n code: 8001\n context: Value too long for type character(30)\n query: 213818\n location: string.cpp:213\n process: query0_113_213818 [pid=25354]\n -----------------------------------------------\n', 'F': '../src/sys/xen_execute.cpp', 'L': '12414', 'R': 'pg_throw'}
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 148, in event_handler
snapshot_system_stats.snapshot([config, os.environ])
File "/var/task/lib/SystemTablePersistence/snapshot_system_stats.py", line 247, in snapshot
insert_rowcounts = snapshot_system_tables(cursor, conn, table_config)
File "/var/task/lib/SystemTablePersistence/snapshot_system_stats.py", line 98, in snapshot_system_tables
cursor.execute(stmt)
File "/var/task/lib/redshift_connector/cursor.py", line 231, in execute
self._c.execute(self, operation, args)
File "/var/task/lib/redshift_connector/core.py", line 1800, in execute
self.handle_messages(cursor)
File "/var/task/lib/redshift_connector/core.py", line 1986, in handle_messages
raise self.error

Solution:

And the solution is to increase the size of the field "label" in here

In my case the values were between 30 to 50 but I made it CHAR(100) for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant