This function uploads validated data to specified remote repositories, such as CKAN, Amazon S3, and/or MongoDB.
Usage
remote_share(
validation,
data_formatted,
files,
verified,
valid_rules,
valid_key_share,
ckan_url,
ckan_key,
ckan_package,
url_to_send,
rules,
results,
s3_key_id,
s3_secret_key,
s3_region,
s3_bucket,
mongo_key,
mongo_collection,
old_cert = NULL
)
Arguments
- validation
A list containing validation information.
- data_formatted
A list containing formatted data.
- files
A vector of file paths to upload.
- verified
The secret key provided by the portal maintainer.
- valid_rules
A list of valid rules for the dataset.
A valid key to share data.
- ckan_url
The URL of the CKAN instance.
- ckan_key
The API key for the CKAN instance.
- ckan_package
The CKAN package to which the data will be uploaded.
- url_to_send
The URL to send the data.
- rules
A set of rules used for validation.
- results
A list containing results of the validation.
- s3_key_id
AWS ACCESS KEY ID
- s3_secret_key
AWS SECRET ACCESS KEY
- s3_region
AWS DEFAULT REGION
- s3_bucket
The name of the Amazon S3 bucket.
- mongo_key
mongo connection url
- mongo_collection
collection name
- old_cert
(Optional) An old certificate to be uploaded alongside the new one to override the previous submission with.
Examples
if (FALSE) { # \dontrun{
shared_data <- remote_share(validation = result_valid,
data_formatted = result_valid$data_formatted,
files = test_file,
verified = "your_verified_key",
valid_key_share = "your_valid_key_share",
valid_rules = digest::digest(test_rules),
ckan_url = "https://example.com",
ckan_key = "your_ckan_key",
ckan_package = "your_ckan_package",
url_to_send = "https://your-url-to-send.com",
rules = test_rules,
results = valid_example$results,
s3_key_id = "your_s3_key_id",
s3_secret_key = "your_s3_secret_key",
s3_region = "your_s3_region",
s3_bucket = "your_s3_bucket",
mongo_key = "your_mongo_key",
mongo_collection = "your_mongo_collection",
old_cert = NULL
)
} # }