dataframe.to_sql 进入 Teradata(此用户无权在 LABUSERS 上创建)Datalab Table 名称
dataframe.to_sql into Teradata (this user does not have permission to create on LABUSERS) Datalab Table name
我在尝试使用此功能时遇到 dataframe.to_sql
问题
dataframe.to_sql
不识别或分隔数据实验室名称和 table 名称,而是将其全部作为一个字符串来创建 table。所以它试图在默认根级别上创建它并给出错误,此用户没有在 LABUSERS.
上创建的权限
from sqlalchemy import create_engine
engine = create_engine(f'teradata://{username}:{password}@tdprod:22/')
df.to_sql('data_lab.table_name', engine)
如何使用df.to_sql
功能并指定数据实验室?
schema
(字符串,可选)
指定模式(如果数据库风格支持)。如果 None,使用默认架构。
我在尝试使用此功能时遇到 dataframe.to_sql
问题
dataframe.to_sql
不识别或分隔数据实验室名称和 table 名称,而是将其全部作为一个字符串来创建 table。所以它试图在默认根级别上创建它并给出错误,此用户没有在 LABUSERS.
from sqlalchemy import create_engine
engine = create_engine(f'teradata://{username}:{password}@tdprod:22/')
df.to_sql('data_lab.table_name', engine)
如何使用df.to_sql
功能并指定数据实验室?
schema
(字符串,可选)
指定模式(如果数据库风格支持)。如果 None,使用默认架构。