本文整理汇总了Python中simple_salesforce.Salesforce.columns方法的典型用法代码示例。如果您正苦于以下问题:Python Salesforce.columns方法的具体用法?Python Salesforce.columns怎么用?Python Salesforce.columns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simple_salesforce.Salesforce
的用法示例。
在下文中一共展示了Salesforce.columns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _salesforce_import
# 需要导入模块: from simple_salesforce import Salesforce [as 别名]
# 或者: from simple_salesforce.Salesforce import columns [as 别名]
def _salesforce_import(self, session_id, instance, user, user_company):
#print session_id, instance, user, user_company
#SESSION_ID = "00Dj0000001neXP!AQUAQIbUn9RsdTZH6MbFA7qaPtDovNU75.fOC6geI_KnEhJKyUzk2_yFx2TXgkth7zgFuJThY6qZQwH7Pq4UtlcW.Cq0aHt1"
print instance
print instance.replace("https://","")
sf = Salesforce(instance=instance.replace("https://",""),
session_id=session_id)
lol = sf.query_all("SELECT Id, Name, Email FROM Contact")
sf = pd.DataFrame(pd.DataFrame(lol).records.tolist())
sf = sf[["Name","Email"]]
sf.columns = ["name","email"]
sf = sf.dropna()
sf["domain"] = [i.split("@")[-1] if i else "" for i in sf.email]
sf["source"] = "salesforce"
sf["db_type"] = "crm"
sf["user"] = [Parse()._pointer("_User", user) for i in sf.index]
sf["user_company"] = [Parse()._pointer("UserCompany",user_company)
for i in sf.index]
Parse()._batch_df_create("UserContact", sf)
Prospecter()._batch_df_create("UserContact", sf)
print Prospecter().update("_User/"+user,
{"salesforce_integration":arrow.utcnow().timestamp,
"salesforce_token":session_id}).json()