RImport | R Documentation |
Manage R based data import.
Manage R based data import.
This object should not be initialised directly. Use dettl
to
create the object.
Import can be run by working with import object returned by
dettl
or by running top-level functions. Run the import by
working with this object if you want to step through the import process
stage by stage and inspect the data after each stage.
dettl::Import
-> RImport
reload()
Reload the objects sources to refresh source code or repair a broken Postgres connection.
RImport$reload()
read_config()
Read and parse config from path.
RImport$read_config()
get_extracted_data()
Get the extracted data created by the extract step
RImport$get_extracted_data()
The extracted data
get_transformed_data()
Get the transformed data created by the transform step
RImport$get_transformed_data()
The transformed data
extract()
Run the extract stage of the data import
RImport$extract()
transform()
Run the transform stage of the data import
RImport$transform()
pre_modify_checks()
Run suite of checks to verify that db can be modified
RImport$pre_modify_checks(dry_run, allow_dirty_git)
dry_run
Whether to run in dry run mode. If TRUE then any database changes will be rolled back. Defaults to FALSE.
allow_dirty_git
If TRUE then skips check that the import is up to date with remote git repo. FALSE by default.
run_import()
Run multiple stages of the data import
RImport$run_import( comment = NULL, dry_run = FALSE, allow_dirty_git = FALSE, stage = c("extract", "transform"), save = FALSE )
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
stage
The stage or stages of the import to be run.
save
Path and name to save data from each stage at, if TRUE then will save to a tempfile.
path <- dettl:::prepare_test_import( system.file("examples", "person_information", package = "dettl"), system.file("examples", "dettl_config.yml", package = "dettl")) import_path <- file.path(path, "person_information") import <- dettl::dettl(import_path, db_name = "test") import$extract() import$transform() import$load()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.