<p><strong>Windows 10、Python 3.9.4、雪花连接器Python 2.4.2、熊猫1.1.5</strong></p>
<ul>
<li><p>我对<strong>write\u</strong>函数也有同样的问题</p>
</li>
<li><p>我对Snowflake有<strong>accountadmin</strong>特权。下面是Python代码和错误回溯</p>
</li>
<li><p>但是,如果我要显式编写CSV文件,我可以使用以下两个功能从CSV文件上载数据:</p>
</li>
</ul>
<ol>
<li><strong>“将文件://”</strong>(放入雪花暂存)和</li>
<li><strong>“从复制到”</strong>(雪花暂存)</李>
</ol>
<p>因此,它肯定是一款具有<strong>写入功能的产品</p>
<pre><code>```import pandas as pd
```import snowflake.connector
```...
```from snowflake.connector.pandas_tools import write_pandas
```conn = snowflake.connector.connect(
``` user=strSnowflakeUserLogin,
``` password=strSnowflakeUserPassword,
``` account=strSnowflakeAccount,
``` role=strSnowflakeUserRole,
``` warehouse=strSnoflakeWarehouse,
``` database=strSnowflakeDatabase,
``` schema=strSnowflakeSchema
``` )
Traceback (most recent call last):
File "myPython.py", line xxx, in <module> myPythonModule()
write_pandas(conn, df, strSnowflakeTable)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python39\lib\site-packages\snowflake\connector\pandas_tools.py", line 197, in write_pandas
copy_results = cursor.execute(copy_into_sql, _is_internal=True).fetchall()
File "C:\Users\<username>\AppData\Local\Programs\Python\Python39\lib\site-packages\snowflake\connector\cursor.py", line 692, in execute
Error.errorhandler_wrapper(
File "C:\Users\<username>\AppData\Local\Programs\Python\Python39\lib\site-packages\snowflake\connector\errors.py", line 258, in errorhandler_wrapper
cursor.errorhandler(connection, cursor, error_class, error_value)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python39\lib\site-packages\snowflake\connector\errors.py", line 188, in default_errorhandler
raise error_class(
snowflake.connector.errors.ProgrammingError: 001757 (42601): SQL compilation error:
Table 'mySnowflakeTable' does not exist
```...
```write_pandas(conn, df, strSnowflakeTable)
</code></pre>