You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for making this. I noticed I'm unable to write queries with the 'Having' Clause. The website documentation shows this method can use SQL having; however, the the code doesn't appear to call it out.
def get(self, dataset_identifier, content_type="json", **kwargs):
'''
Read data from the requested resource. Options for content_type are json,
csv, and xml. Optionally, specify a keyword arg to filter results:
select : the set of columns to be returned, defaults to *
where : filters the rows to be returned, defaults to limit
order : specifies the order of results
group : column to group results on
limit : max number of results to return, defaults to 1000
offset : offset, used for paging. Defaults to 0
q : performs a full text search for a value
query : full SoQL query string, all as one parameter
exclude_system_fields : defaults to true. If set to false, the
response will include system fields (:id, :created_at, and
:updated_at)
More information about the SoQL parameters can be found at the official
docs:
http://dev.socrata.com/docs/queries.html
More information about system fields can be found here:
http://dev.socrata.com/docs/system-fields.html
'''
resource = _format_new_api_request(dataid=dataset_identifier, content_type=content_type)
headers = _clear_empty_values({"Accept": kwargs.pop("format", None)})
# SoQL parameters
params = {
"$select": kwargs.pop("select", None),
"$where": kwargs.pop("where", None),
"$order": kwargs.pop("order", None),
"$group": kwargs.pop("group", None),
"$limit": kwargs.pop("limit", None),
"$offset": kwargs.pop("offset", None),
"$q": kwargs.pop("q", None),
"$query": kwargs.pop("query", None),
"$$exclude_system_fields": kwargs.pop("exclude_system_fields",
None)
}
# Additional parameters, such as field names
params.update(kwargs)
params = _clear_empty_values(params)
response = self._perform_request("get", resource, headers=headers,
params=params)
return response
The text was updated successfully, but these errors were encountered:
Hi, sorry for the late reply. Where's that code snippet from? Is that from the other library called soda-py?
They're different projects, and I definitely understand that confusion. It's something we've been talking about trying to straighten out. Soda-py has reading and metadata functionality in it. This library is pretty much only concerned with publishing data to socrata, so socrata-py is probably not the best name for it...
Hi Team,
Thank you for making this. I noticed I'm unable to write queries with the 'Having' Clause. The website documentation shows this method can use SQL having; however, the the code doesn't appear to call it out.
The text was updated successfully, but these errors were encountered: