Teradata Package for R Function Reference | 17.00 - td_copy_files_from_container - Teradata Package for R - Look here for syntax, methods and examples for the functions included in the Teradata Package for R.

Teradata® Package for R Function Reference

Product
Teradata Package for R
Release Number
17.00
Published
July 2021
Language
English (United States)
Last Update
2023-08-08
dita:id
B700-4007
NMT
no
Product Category
Teradata Vantage
Copy files from container

Description

Function to copy file(s) from container, specified by "container" argument or container indicated by the option 'sandbox.container', to local filesystem.
Notes:

  1. Files are copied to a directory ".tdplyr" directory in user's home directory. The user can get home directory using Sys.getenv("HOME"). If this is not present, then user can find the files in R home directory which can be obtained using Sys.getenv("R_HOME").

  2. User is responsible for cleaning up this directory.

  3. If copying succeeds for one or more files, the list of files for which copying is successful and the location in which files are copied are displayed in console output.

  4. If copying fails for one or more files, then the failed file names and the reasons for failure are displayed in the console output.

  5. If there are duplicate elements in the argument "files.to.copy", then all the duplicated elements are copied only once.

Usage

td_copy_files_from_container(files.to.copy, container = NULL)

Arguments

files.to.copy

Required Argument.
Specifies the file name(s) to be copied from the container.
Note:

  • Files should be in "/home/tdatuser" inside the container.

Types: character OR vector of Strings

container

Optional Argument.
Specifies the container from which files are to be copied. If not specified, then files are copied from container specified in the option "sandbox.container".
Types: character

Value

TRUE, invisibly.

Examples


# Example 1: Copy files from container started by tdplyr to local client.
td_copy_files_from_container(files.to.copy = "<file1.txt>")

# Example 2: Copy files from container, specified by the argument
#            "container", to local client.
td_copy_files_from_container(files.to.copy = c("<file1.txt>", "<file2.txt>"),
                             container = "<container_id>")