我定义了这两个数据集:
flp_test_query:
type: pandas.SQLQueryDataSet
credentials: dw_dev_credentials
sql: select numero from dwdb.dwschema.flp_tst
load_args:
index_col: [numero]
flp_test:
type: pandas.SQLTableDataSet
credentials: dw_dev_credentials
table_name: flp_tst
load_args:
index_col: ['numero']
columns: ['numero']
save_args:
if_exists: 'append'
然而,我只设法使flp_test_query
工作,因为当我试图访问flp_tst
时,我得到了这个错误:
ValueError:未找到表flp_tst
我确实尝试将表名定义为table_name: dwschema.flp_tst
和table_name: dwdb.dwschema.flp_tst
,但都出现了相同的错误。我错过了什么?
从文档中可以指定load_args
中的模式,例如
load_args:
index_col: ['numero']
columns: ['numero']
schema: 'dwschema'
或
load_args = {"schema","dwschema"}
data_set = SQLTableDataSet(table_name=table_name,
credentials=credentials,
load_args=load_args)