We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As a user, I'd like to be able to specify when certain columns are related (eg. address columns) so that the SDV can handle them appropriately.
Add a new method to the metadata classes called add_column_relationship.
add_column_relationship
add_column_relationship(type: str, column_names: list)
type
column_names
metadata.add_column_relationship( type="address", column_names=["vendor_city", "vendor_state", "vendor_zipcode", ...] )
Calling this method should add the relationship to the metadata so tat inspecting the metadata yields
{ "columns": { "user_lat": { "sdtype": "latitude" }, "user_lon": { "sdtype": "longitude" }, }, "column_relationships": [{ "type": "gps_coordinate", "column_names": ["user_lat", "user_lon" ], }] }
add_column_relationship(type: str, table_name: str, column_names: list)
table_name
{ "tables": { "users": { "columns": { "user_lat": { "sdtype": "latitude" }, "user_lon": { "sdtype": "longitude" }, }, "column_relationships": [{ "type": "gps_coordinate", "column_names": ["user_lat", "user_lon" ], }] } }, "relationships": [{ ... }] }
The text was updated successfully, but these errors were encountered:
frances-h
Successfully merging a pull request may close this issue.
Problem Description
As a user, I'd like to be able to specify when certain columns are related (eg. address columns) so that the SDV can handle them appropriately.
Expected behavior
Add a new method to the metadata classes called
add_column_relationship
.add_column_relationship(type: str, column_names: list)
type
: A string with the type of relationship. Only possibility for now is "address"column_names
: A list of column namesCalling this method should add the relationship to the metadata so tat inspecting the metadata yields
add_column_relationship(type: str, table_name: str, column_names: list)
type
: A string with the type of relationship. Only possibility for now is "address"table_name
: Name of the table that the relationship is in.column_names
: A list of column namesCalling this method should add the relationship to the metadata so tat inspecting the metadata yields
Additional context
The text was updated successfully, but these errors were encountered: