0

我定义了这两个数据集:

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_tsttable_name: dwdb.dwschema.flp_tst但都出现了相同的错误。我错过了什么?

4

1 回答 1

2

文档看来,您可以在中指定架构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)
于 2021-07-12T21:16:17.253 回答