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

label_column option in metadata.json #234

Closed
simonw opened this issue Apr 21, 2018 · 3 comments
Closed

label_column option in metadata.json #234

simonw opened this issue Apr 21, 2018 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Apr 21, 2018

Currently the column used for displaying a foreign key relationship is automatically detected by inspect() by looking for tables that have a primary key column and one other column.

This doesn't work for tables with more than two columns.

Let's allow the table section in metadata.json to optionally define a label_column which, if present, will be used for those displays.

@simonw
Copy link
Owner Author

simonw commented Apr 22, 2018

    "databases": {
        "database1": {
            "tables": {
                "example_table": {
                    "label_column": "name"
                }
            }
        }
    }
}

@simonw simonw closed this as completed in f27cabb Apr 22, 2018
@simonw
Copy link
Owner Author

simonw commented Apr 22, 2018

@simonw
Copy link
Owner Author

simonw commented Apr 22, 2018

I built this wrong: my implementation is looking for the label_column on the table-being-displayed, but it should be looking for it on the table-the-foreign-key-links-to.

@simonw simonw reopened this Apr 22, 2018
@simonw simonw closed this as completed in f3f4295 Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant