dettl_run: Run specified stages of an import

View source: R/dettl_runner.R

dettl_runR Documentation

Run specified stages of an import

Description

Run specified stages of an import

Usage

dettl_run(
  import,
  db_name = NULL,
  comment = NULL,
  dry_run = FALSE,
  allow_dirty_git = FALSE,
  stage = c("extract", "transform"),
  ...
)

Arguments

import

Path to import directory.

db_name

The name of the db to connect to. Connection info must be configured via the 'dettl_config.yml'. If name is left blank this will default to using the first db configured.

comment

Optional comment to be written to db log table when import is run.

dry_run

If TRUE then any changes to the database will be rolled back.

allow_dirty_git

If TRUE then skips check that the import is up to date with remote git repo.

stage

The stage or stages of the import to be run.

...

Additional args passed to run_import for a specific import type see RImport$run_import()

Value

The import object

Examples

path <- dettl:::prepare_test_import(
  system.file("examples", "person_information", package = "dettl"),
  system.file("examples", "dettl_config.yml", package = "dettl")
)
dettl::dettl_run(file.path(path, "person_information/"), "test",
  comment = "Example import")
dettl::dettl_run(file.path(path, "person_information/"), "test",
  comment = "Example import",
  save = tempfile())
import <- dettl::dettl_run(file.path(path, "person_information/"),
  "test", stage = "extract")
dettl::dettl_run(file.path(path, "person_information/"), "test",
  stage = c("extract", "transform", "load"),
  comment = "Example import")

vimc/dettl documentation built on Oct. 6, 2022, 2:13 p.m.