I have a snowflake table and I am using the Snowflake Python Connector to insert value into it. Since I have a lot of data I am using a python generator object to insert value into my table.
conn = snowflake.connector.connect(...)
with conn.cursor() as write_cur:
write_cur.executemany("INSERT INTO TABLE_1 VALUES (%s, %s)",
generator_data)
but this seems to throw an error that generator has no attribute len() . Is there anyway I can use an iterator to insert values into a snowflake table.
executemanyfunction expecting an iterable that has a length