Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Support for Socrata Headers? #76

Closed
RUDelerius opened this issue Dec 21, 2020 · 3 comments
Closed

Support for Socrata Headers? #76

RUDelerius opened this issue Dec 21, 2020 · 3 comments

Comments

@RUDelerius
Copy link

Sorry if this isn't the appropriate place to ask about this. Please close it if not. I'm working on my very first python script and I've been looking for a way to get the field names and data types for just the record set returned by my query.

client.get_metadata() returns all fields, but I want to build a dictionary using just the fields in my results.

Response headers X-SODA2-Fields (and X-SODA2-Types) should return a set limited to just the fields returned by the get() request.

Is this something that could be supported? I can see in utils.py the response header is processed for response codes, but cannot find anything that processes these fields. Or maybe I should just use requests instead?

@xmunoz
Copy link
Owner

xmunoz commented Dec 22, 2020

Totally! I can take a look at this later in the week. If you want to try to implement it before then, feel free to send a PR.

@xmunoz
Copy link
Owner

xmunoz commented Jan 10, 2021

After thinking about this more carefully, yeah I think you should just use requests directly. If I understand your request correctly, what you want is actually something that constitutes the "Transform" part of ETL. This library is primarily concerned with the "Extract" layer.

@xmunoz xmunoz closed this as completed Jan 10, 2021
@RUDelerius
Copy link
Author

Thank you for your consideration.

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

No branches or pull requests

2 participants