【问题标题】:Can I write from python (specifically pandas) to Salesforce using the simple_salesforce library?我可以使用 simple_salesforce 库从 python(特别是 pandas)写入 Salesforce 吗?
【发布时间】:2020-08-19 18:46:26
【问题描述】:

我使用 simple_salesforce 库和 REST api 从 Salesforce 中提取了一些数据。在 pandas 中清理并进行一些聚合之后,我现在想使用 Salesforce ID 作为写入数据的唯一 ID 将数据写回 Salesforce。 simple_salesforce 中是否有办法将数据写回 Salesforce,或者使用批量 api?

  • Python 版本 3.6 和 3.7
  • Windows 10 x64 位

谢谢!

【问题讨论】:

  • 我在连接 salesforce 和 python 时遇到了一些问题。你能帮忙解决这个问题吗?

标签: python-3.x pandas salesforce simple-salesforce


【解决方案1】:

快速浏览他们的 github 页面显示 examples 使用语法回信给 Salesforce,

sf.sObject.create({'key': 'value', ...})

sf.Contact.update('ID',{'key': 'value', ...})

你试过了吗?

编辑:明确地说,使用唯一 ID 编写听起来像是在寻找更新操作。这是我提到的第二个例子。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-29
    • 1970-01-01
    • 2020-06-20
    • 1970-01-01
    相关资源
    最近更新 更多