Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

How to call pandas_to_vertica insert error

edited November 2021 in General Discussion

In Table DDL, i am using varchar(20) for the column but the data from pandas is varchar(80) for the same column.

I am using pandas_to_vertica function for ingesting data.

How could i populate the below same error using verticapy.

Due to this records are getting dropped.

This error i see while running manual insert in vertica:

SQL Error [8682] [22001]: [Vertica]VJDBC ERROR: String of 61 octets is too long for type Varchar(20) for column name

Using similar code:

resp=pandas_to_vertica(df,
name = {table},
cursor = cur,
schema = "schema",
insert = True
)
print(resp)

Answers

  • @polakrish : Error message you are receiving is expected because the data length in pandas for that column is greater than varchar(20) defined for the table in vertica. please change the table def in vertica and try pandas_to_vertica again

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.