【发布时间】:2019-09-23 02:23:14
【问题描述】:
我正在尝试使用 Azure 数据工厂通过 REST API 从 Pendo 获取数据。此活动的 PYTHON 代码是
import requests
url = "https://app.pendo.io/api/v1/aggregation"
data = "{\"response\":{\"mimeType\":\"application/json\"},\"request\":{\"pipeline\":[{\"source\":{\"guideEvents\":null,\"timeSeries\":{\"first\":\"1506977216000\",\"count\":-10,\"period\":\"dayRange\"}}}]}}"
headers = {
'x-pendo-integration-key': "[add_your_pendo_int_key_here]",
'content-type': "application/json"
}
response = requests.post(url, data = data, headers = headers)
如何通过 Azure 数据工厂定义代码的数据部分? 我已将 content-type 和 x-pendo-integration-key 放在附加标头中。
【问题讨论】:
-
附注:如果将
data括在三引号中,则不需要所有这些反斜杠。
标签: python azure azure-data-factory