when I run the following function:
def write_df_to_vertica(conn: Cursor, df: pd.DataFrame):
query = """COPY temp_data.test(coumn1, coumn2, coumn3) FROM STDIN DELIMITER ',' """
conn.copy(query, df.to_csv(index=False, header=False))
it works, and the data is written to vertica db.
However when I call this function from PythonOperator in a AirFlow dag, the data isn't written to the db.
Why? and how to fix it?