davlee1972 commented on issue #2094:
URL: https://github.com/apache/arrow-adbc/issues/2094#issuecomment-2307627547

   Something else is off.. I don't think it is stage.. It looks like stage is 
clearly getting nuked after the connection dies. Force removing files from 
stage after adbc_ingest didn't help either..
   
   ```
   
   for file in files:
       print(file)
       dataset = ds.dataset(file)
       print(dataset.count_rows())
       with 
snowflake_gateway.source.dbapi.connect(**snowflake_gateway.source.db_args) as 
conn:
           with conn.cursor() as cur:
               print("before")
               try:
                   cur.execute("list '@ADBC$BIND'")
                   print(cur.fetchall())
               except:
                   print("no files in stage")
                   pass
               cur.adbc_ingest(snowflake_gateway.source.table_name, 
dataset.to_table(columns=computed_columns), mode="append")
               cur.execute("rm '@ADBC$BIND'")
               cur.execute("list '@ADBC$BIND'")
               print("after")
               print(cur.fetchall())
               cur.execute("select count(*) from " + 
snowflake_gateway.source.table_name)
               print(cur.fetchall())
   ```
   
   
![image](https://github.com/user-attachments/assets/9e4dd96b-8a47-41f3-ab42-3c55c35b45a2)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to