Skip to main content
Question

How to call pandas_to_vertica insert error

  • November 28, 2021
  • 1 reply
  • 4 views

polakrish

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)

1 reply

SruthiA
Forum|alt.badge.img+1
  • Participating Frequently
  • November 29, 2021

@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