Skip to content

Naming pattern not used in dm_from_con() when keys are learned successfully #2213

Open
@owenjonesuob

Description

@owenjonesuob

A new .names parameter was added to dm_from_con() in v1.0.6 (#1790) - but it's currently ignored when learn_keys = TRUE and the subsequent key-querying is successful.

That's because dm_from_con() returns early if key-querying, via dm_learn_from_db(), succeeds.

Helpfully, dm_learn_from_db() already accepts a names_pattern argument, which is used to format the table names with {glue} in the same way as elsewhere - but we don't pass .names through to it in dm_from_con():

dm_learned <- dm_learn_from_db(con, ...)


For what it's worth, if key-querying fails, then later in dm_from_con() we do pass .names through to get_src_tbl_names():

src_tbl_names <- get_src_tbl_names(src, ..., names = .names)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions