将数据从Salesforce导入到数据映

发布于 2025-02-05 03:33:43 字数 643 浏览 0 评论 0原文

我正在尝试使用 simple_salesforce 将数据从Salesforce导入数据映。它可以与具有较少字段的对象使用,但是如果我的对象具有更多字段,则开始失败。

以下是我正在尝试的

sf = Salesforce (
    username = username,
    password = password,
    security_token = security_token,
    domain="test"
)

df = pd.DataFrame(sf.query("Here I am passing all fields they are around 1000 in select query" from "+table)['records']).dropna(axis='columns', how='all').drop(['attributes'],axis=1)

错误

Error Code 414. Response content: <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

I am trying to import data from salesforce to databricks using simple_salesforce . It is working fine with objects having less fields but started failing if my object has more fields.

Below is what I am trying

sf = Salesforce (
    username = username,
    password = password,
    security_token = security_token,
    domain="test"
)

df = pd.DataFrame(sf.query("Here I am passing all fields they are around 1000 in select query" from "+table)['records']).dropna(axis='columns', how='all').drop(['attributes'],axis=1)

Error

Error Code 414. Response content: <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野の 2025-02-12 03:33:43

SOQL can handle queries up to 100K字符。您达到了那个限制吗?

您可以将其切成2个查询吗? 选择ID,外部ID__C,Afield__c,bfield__c,...说“直至“ m”,然后选择ID,externalId__c,mfield__c,nfield__c,nfield__c,...

还是以其他方式将它们分开,也许越来越重要?如果您可以想到不必同步的内容,您甚至可以从集成用户中隐藏某些字段(在配置文件 /权限集中删除复选框)。

SOQL can handle queries up to 100K characters. Have you hit that limit?

Can you cut it into 2 queries? SELECT Id, ExternalId__c, Afield__c, Bfield__c, ... say till "M" and then SELECT Id, ExternalId__c, Mfield__c, Nfield__c, ... ?

Or split them other way, maybe more and less important ones? You could even hide certain fields from the integration user (remove the checkboxes in Profile / Permission Set) if you can think of something that doesn't have to be synchronised.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文