• cdm_flatten_to_tbl() disambiguates only the necessary columns.
  • When flattening, the column name of the LHS (child) table is used (#52).
  • Fix formatting in enum_pk_candidates() for character data.
  • cdm_add_pk() and cdm_add_fk() no longer check data integrity by default.
  • Explicitly checking that the join argument is a function, to avoid surprises when the caller passes data.
  • cdm_copy_to() works correctly with filtered dm objects.
  • cdm_apply_filters() actually resets the filter conditions.
  • A more detailed README file and a vignette for filtering (#29, @cutterkom).
  • cdm_draw() no longer supports the table_names argument, use cdm_select_tbl().
  • Copying a dm to a database now creates indexes for all primary and foreign keys.

dm 0.0.2

Breaking changes

  • Requires tidyr >= 1.0.0.
  • cdm_nrow() returns named list (#49).
  • Remove cdm_semi_join().
  • Remove cdm_find_conn_tbls() and the all_connected argument to cdm_select() (#35).
  • Unexport cdm_set_key_constraints().
  • Rename cdm_select() to cdm_select_tbl(), now uses {tidyselect}.
  • cdm_nycflights13() now has cycle = FALSE as default.
  • Rename cdm_check_for_*() to cdm_enum_*().


  • cdm_filter() only records the filtering operation, the filter is applied only when querying a table via tbl() or when calling compute() or the new cdm_apply_filters() (#32).

New functions

Minor changes

  • browse_docs() opens the pkgdown website (#36).
  • as_dm() now also accepts a list of remote tables (#30).
  • Use {tidyselect} syntax for cdm_rename_tbl() and cdm_select_tbl() (#14).
  • The tibbles returned by cdm_enum_fk_candidates() and cdm_enum_pk_candidates() contain a why column that explains the reasons for rejection in a human-readable form (#12).
  • Improve compatibility with RPostgres.
  • create_graph_from_dm() no longer fails in the presence of cycles (#10).
  • Only suggest {RSQLite}.
  • cdm_filter() no longer requires a primary key.
  • decompose_table() adds the new column in the table to the end.
  • tbl() now fails if the table is not part of the data model.


  • Add setup article (#7).


  • Using simpler internal data structure to store primary and foreign key relations (#26).
  • New nse_function() replaces h() for marking functions as NSE to avoid R CMD check warnings.
  • Simplified internal data structure so that creation of new operations that update a dm becomes easier.
  • When copying a dm to a database, NOT NULL constraints are set at creation of the table. This removes the necessity to store column types.
  • Using {RPostgres} instead of {RPostgreSQL} for testing.

dm 0.0.1

Initial GitHub release.

Primary keys

Foreign keys


  • cdm_join_tbl()


Interaction with DBs

Utilizing foreign key relations