This may be too much of an edge case to merge, but here goes. Some databases may have quasi-foreign key relations, where no foreign key constraint is declared, but a column in one table still refers to primary keys in another table. In that case, it's helpful to be able to manually specify a set of additional foreign key relationships that the subsetter should respect. This patch adds an optional command line argument called --config that can point to a JSON file. The constraints field of that file, if it exists, is inspected for additional quasi-foreign key relationships--example at https://github.com/jmcarp/openFEC/blob/feature/auto-subset/data/subset-config.json.
This may be too much of an edge case to merge, but here goes. Some databases may have quasi-foreign key relations, where no foreign key constraint is declared, but a column in one table still refers to primary keys in another table. In that case, it's helpful to be able to manually specify a set of additional foreign key relationships that the subsetter should respect. This patch adds an optional command line argument called
--config
that can point to a JSON file. Theconstraints
field of that file, if it exists, is inspected for additional quasi-foreign key relationships--example at https://github.com/jmcarp/openFEC/blob/feature/auto-subset/data/subset-config.json.