简体   繁体   English

python simple_salesforce查询全部

[英]python simple_salesforce query all

I am using the package simple_salesforce to access Salesforce data. 我正在使用包simple_salesforce访问Salesforce数据。 I am querying the tables in Salesforce this way: 我以这种方式查询Salesforce中的表:

from simple_salesforce import Salesforce
sf = Salesforce(username = '', password = '', security_token = '')
sf.query("SELECT Id, Name FROM Main__c LIMIT 2000")

This works perfectly fine, but if I want to query all the columns instead, things start throwing errors. 这工作得很好,但是如果我想查询所有列,事情就会开始抛出错误。

I tried: 我试过了:

sf.query("SELECT * FROM Main__c LIMIT 2000")
sf.query("SELECT All FROM Main__c LIMIT 2000")

Here is the error: 这是错误:

Response content: No such column 'ALL' on entity 'Main__c'. If you are 
attempting to use a custom field, be sure to append the '__c' after the 
custom field name. Please reference your WSDL or the describe call for the 
appropriate names."}]

I am not sure how to proceed. 我不确定如何进行。 How can I accomplish querying all the columns? 如何完成对所有列的查询?

Salesforce does not support SELECT * FROM Object, you must include the specific fields that you want to be returned from the query, id the way you did in the first query. Salesforce不支持SELECT * FROM Object,您必须包括要从查询中返回的特定字段,即您在第一个查询中所做的方式。 See the SOQL Syntax Help page here 这里查看SOQL语法帮助页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python simple_salesforce代理用法 - python simple_salesforce proxy usage 使用python和simple_salesforce将文件上传到salesforce为空 - File uploaded to salesforce empty using python and simple_salesforce simple_salesforce python中的父子关系查询,从有序字典中提取 - parent-child relationship query in simple_salesforce python, extracting from ordered dicts simple_salesforce python:sf.instance.bulk.query 给出索引错误 - simple_salesforce python : sf.instance.bulk.query gives index error 找不到simple_salesforce方法 - simple_salesforce method not found ModuleNotFoundError:没有名为“simple_salesforce”的模块 - ModuleNotFoundError: No module named 'simple_salesforce' simple_salesforce Feed 项目 @mention 问题 - simple_salesforce Feed Item @mention problem simple-salesforce 和 simple_salesforce 有什么区别? - What is the difference between simple-salesforce and simple_salesforce? Python import simple_salesforce 在 Databricks 中给出:没有名为 cryptography.hazmat.primitives.asymmetric.ed25519 的模块 - Python import simple_salesforce in Databricks gives: No module named cryptography.hazmat.primitives.asymmetric.ed25519 读取超时。 (读取超时=无)通过 simple_salesforce API 在 Python 中插入记录时 - Read timed out. (read timeout=None) when inserting records through simple_salesforce API in Python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM