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
data_connector: Fetch all publications of one specific author #50
Comments
Hi, I would like to work on this enhancement. I just had a couple of questions and it would be great if you could point me in the right direction. 'author' in the API call is part of the 'q' query string parameter. What exactly is the expected behavior? I believe that as an end-user, one would just want to specify Any suggestions on this would be of help. Thank you! |
Hi @pallavibharadwaj, we recently merged a PR (#70) called Basically you can help us add this to the dblp config and test if it works.
So that you can issue queries like Note that the templated query PR is not very tested so there could be bugs somewhere and please don't hesitate to file an issue/PR to this repo! |
@dovahcrow - Sure, I'm taking up this issue and will try the format that you mentioned. I had another question. Could you please brief me or redirect me to instructions on how to make the build after DataConnectorConfig changes? I had to clone that separately into dataprep and I don't seem to find any instructions related to it. Please assign the issue to me so that no one would spend time debugging it. Thank you! |
@pallavibharadwaj You can create a Connector via |
@dovahcrow - I needed a small clarification on tokey and fromkey parameters.
Thank you! |
elif isinstance(def_, dict):
template = def_.get("template")
remove_if_empty = def_["removeIfEmpty"]
to_key = def_.get("toKey") or to_key
from_key = def_.get("fromKey") or from_key
if template is None:
required = def_["required"]
value = params.get(from_key)
if value is None and required:
raise KeyError(from_key)
else:
tmplt = jenv.from_string(template)
value = tmplt.render(**params) If the template variable is defined (not None), it will always be used. So, yes, it is always the case that the parameter dictionary would have it re-constructed to
if to_key in ret:
print(Warning(f"{key} conflicting with {to_key}")) There will be a warning printed out if the
|
@dovahcrow - Isn't the template field also a |
@pallavibharadwaj Ah I see. There's a mistake in my comment. The correct config for the
|
@dovahcrow - Okay, this looks good. However, I will create an issue for this and work on it first. Please let me know if that sounds okay or you have anything else in mind. |
@pallavibharadwaj Somehow the JSON schema error is not very informative. Actually it's missing a field Have a try on this:
|
Suppose a user wants to fetch all publications of one specific author (e.g., Jian Pei). Dataprep.data_connector cannot meet her needs. For example, the first paper is not written by Jian Pei, but it was returned since the author list contains the keywords
Jian
andPei
.A user can get all publications of
Jian Pei
through this API: https://dblp.org/search/publ/api?q=author%3AJian_Pei%3APlease consider to support this feature.
The text was updated successfully, but these errors were encountered: