-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fvk socrata tweaks #1344
base: main
Are you sure you want to change the base?
Fvk socrata tweaks #1344
Conversation
840743c
to
c659320
Compare
dcpy/connectors/socrata/publish.py
Outdated
) | ||
if our_col.custom and our_col.custom.get("api_name"): | ||
logger.info(f"Mapping column {our_col.id} to {col}") | ||
output_schema.change_column_transform(col).to(f"`{our_col.id}`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this probably should be our_col.name.lower()
rather than our_col.id
- as far as I can tell, that's how socrata reads in the datasets
@@ -594,6 +593,7 @@ def push_dataset( | |||
for attachment_id in socrata_dest.attachment_ids | |||
] | |||
|
|||
dataset.discard_open_revisions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should remember to take this out 🙂
output_schema.change_column_metadata(field_name, "position").to( | ||
our_col_index + 1 | ||
) | ||
# .change_column_metadata(col, "initial_output_column_id").to(col.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left this as a comment but seems like this is handled under the hood when using the socratapy methods
dd3a0ab
to
a7a8f89
Compare
19a1221
to
8ef3894
Compare
@alexrichey - tried to keep things pretty 1-1 with existing code for now.
See https://data.cityofnewyork.us/City-Government/2010-Census-Blocks-water-areas-included-/jyp7-eqhh/revisions/44 - metadata being applied correctly
This isn't quite right yet. there are some default transformations