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

Support Joins where column name is different from field #152

Closed
Roel opened this issue Feb 4, 2019 · 3 comments · Fixed by #159
Closed

Support Joins where column name is different from field #152

Roel opened this issue Feb 4, 2019 · 3 comments · Fixed by #159
Milestone

Comments

@Roel
Copy link
Member

Roel commented Feb 4, 2019

Currently, we can use Join to chain different searches using a common column name.

It would be nice to extend this to be able to Join a dataframe using a specified column name, that way we would be able to join f.ex. GrondwaterFilter with Boring.

F.ex.:

fs = GrondwaterFilterSearch()
bs = BoringSearch()

df_filters = fs.search(location=Box()), return_fields=('pkey_filter', 'boringfiche')
df_boringen = bs.search(query=Join(df_filters, on='pkey_boring', using='boringfiche'))
@pjhaest
Copy link
Collaborator

pjhaest commented Feb 4, 2019

Ok, nice. I didn't know yet about the Join functionality in owslib.
But if I understand correctly, this does not resolve #151 (even if the column name would be the same)? Because in #151 you query for something that does not exist?

Maybe it's easiest to adapt the column names of the different types in the dataframe to the same definition, now that we did not yet release anything? For example, change 'gw_id' in GrondwaterFilterSearch() to 'putnummer' of the BoringSearch()? That way we can use to above Join without having to do much remapping of column names for the joins?

@Roel
Copy link
Member Author

Roel commented Feb 5, 2019

The Join query is pydov specific: see the docs.

I do agree that more consistency in naming would be good. While we can rename fields that are included in the default dataframes at the pydov side, this cannot be done for all other fields (f.ex. 'boringfiche' in the Filter service). They would need updating in the services themselves.

@Roel
Copy link
Member Author

Roel commented Mar 8, 2019

Progress can be tracked in the join-using branch.

@Roel Roel added this to the v0.1.0 milestone Mar 13, 2019
@Roel Roel modified the milestones: v0.1.0, v0.2.0 May 7, 2019
@Roel Roel closed this as completed in #159 May 14, 2019
@Roel Roel removed the in progress label May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants