当我从 Teradata 将数据加载到 CSV 中时,我的 Python 脚本卡住了,无法继续运行



脚本将数据保存到csv文件中,这是cur.execute命令,然后什么也没发生,只是挂在同一个地方,打印(0(从不打印

exit

import teradatasql

def teradata_to_bigquery_export(bqproject = 'project', tddatabase = 'db', tdtable = 'table',bqdataset = 'dataset', gcpSA = 'key.json', host = 'host', user = 'user', password = 'pwd'):
print(123)
# teradata read data and save to dataframe
with teradatasql.connect(host=host, user=user, password=password) as con:
print(-2)
with con.cursor() as cur:
print(-1)
cur.execute("{fn teradata_try_fastexport}{fn teradata_write_csv(myFile.csv)}SELECT * FROM " + tddatabase + "." + tdtable + " WHERE date_creation = CURRENT_DATE")
print(0)
cur.close()
print(1)

我们需要从您那里收集调试日志以进行故障排除。请与Teradata客户支持部门一起创建客户事件。

最新更新