Tableau Server Api 使用多个值筛选器填充 csv

Tableau Server Api populate csv with multiple value filters

我正在尝试将 Tableau Server 客户端与 Python 结合使用,以从具有多个选项的筛选器的特定视图生成 csv 文件,如下图所示。

是否可以在 CSVRequestOptions 中为同一个过滤器指定多个值?

我尝试使用相同的过滤器名称 (client) 作为第一个参数多次调用 vf 方法,但它只 returns 的数据后一个。

def view_populate_csv(view_item):
    csv_req_option = TSC.CSVRequestOptions()
    csv_req_option.vf("client", "client1")
    csv_req_option.vf("client", "client2")
    csv_req_option.vf("client", "client3")

    server.views.populate_csv(view_item, csv_req_option)
    with open("./view_data.csv", "wb") as f:
        f.write(b"".join(view_item.csv))

还尝试只添加“(全部)”选项,但它不会return任何东西 csv_req_option.vf("client", "(all)")

csv_req_option.vf("客户端", "客户端1,客户端2,客户端3")