Python SDK获取报告的所有列 [英] Python SDK getting all columns for report

查看:67
本文介绍了Python SDK获取报告的所有列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个程序,该程序将从用户获取特定报告和列提交它,返回< g class =" gr_ gr_484 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace"数据-GR-ID =" 484"
id =" 484"> csv< / g>来自bing广告的准备工作。

I'm trying to build a program which will get a specific report and columns from the users and submit it, returning the <g class="gr_ gr_484 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="484" id="484">csv</g> from bing ads when it's ready.

示例代码很棒,但我希望包含一个验证,即用户选择的所有列确实对特定报告有效 - 我试过看获取报告名称的函数的MSDN并返回所有有效的
列,但找不到一个,是否有我缺少的东西或者是不支持的?

The example code is great but I would like to include a validation that all the columns which the user selected are indeed valid for a specific report - I tried looking the MSDN for a function which gets a name of a report and returns all the valid columns but couldn't find one, is there something I'm missing or is that just not supported?

同一范围内的另一个问题是,有没有办法知道每列中我会有哪种类型的返回值?知道`date`列永远是时间戳的意思,'x`列是双,而`y`列是int,依此类推......

One other issue in the same scope, is there a way to know which type of return values will I have in every column? Meaning knowing that `date` column will always be a timestamp, and `x` column is double while `y` column is int, and so on...

提前致谢,

Dror Bar

推荐答案

您可以使用SUDS客户端(来自suds.client导入客户端)获取
dict
每个支持值的表示,例如:

You can use the SUDS Client (from suds.client import Client) to get the dict representation of each supported value, for example:

keyword_performance_report_columns=reporting_service.factory.create('KeywordPerformanceReportColumn')
keyword_performance_report_column_dict=Client.dict(keyword_performance_report_columns)
for column in keyword_performance_report_column_dict:
    print(column)



我希望这会有所帮助!


I hope this helps!


这篇关于Python SDK获取报告的所有列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆