Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query a subset of fields from a table #28

Open
tian-l-park opened this issue Mar 4, 2019 · 4 comments
Open

Query a subset of fields from a table #28

tian-l-park opened this issue Mar 4, 2019 · 4 comments

Comments

@tian-l-park
Copy link

Hey, I am trying to use p.prospects.query(fields=[a_list_of_field_names]) to pull only a subset of fields from the prospects table. However, the method only returns 2 columns no matter how long my list is. The returned columns will always be id and whatever field that is the last element in the list. Am I not passing the parameters correctly? Thank you!

@mneedham91
Copy link
Owner

Hi @tian-l-park , I think you are misunderstanding the query function and confusing it with one of the read functions.

p.prospects.query will run a query to get a list of prospects matching your query criteria. You can then use the ids returned with p.prospects.read_by_id(id=id) to get the full information of a particular prospect.

@tian-l-park
Copy link
Author

Hey @mneedham91 , thank you for your response!

Do you know if there is anyway I can query only a subset of fields? I have a big table with 100+ columns and I noticed it takes more than 6s to complete a call. I am thinking maybe by pulling a select number of fields it will run faster. Do you know if there is a function to do that?

Thank you!

@creuzerm
Copy link

The Pardot API itself doesn't allow query filtering on arbitrary fields. We get ID ranging and date, scores and grades filtering only.

@zhar97
Copy link

zhar97 commented Jun 25, 2020

Is it possible to provide a feature that supports fields query either that contains None or with values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants