Learn R Programming

RTD (version 0.4.1)

td_upload: Upload data.frame to TD

Description

Upload data.frame to TD

Usage

td_upload(
  conn,
  dbname,
  table,
  df,
  mode = "bulk_import",
  embulk_dir,
  overwrite = FALSE,
  append = FALSE
)

Arguments

conn

Td connection

dbname

Target destination database name.

table

Target table name.

df

Input data.frame.

mode

Write mode. "bulk_import" or "embulk". Default: "bulk_import"

embulk_dir

Path to embulk. [optional]

overwrite

Flag for overwriting the table if exists. It doesn't overwrite database. This flag sets "replace" mode for embulk-output-td.

append

Flag for append data into the table if exists. It doesn't overwrite database. This flag sets "append" mode for embulk-output-td.

Examples

Run this code
# NOT RUN {
td_upload_embulk("mydb", "iris", iris)

# With overwrite option
td_upload_embulk("mydb", "iris", iris, overwrite = TRUE)

# With append option
td_upload_embulk("mydb", "iris", iris, append = TRUE)

# With overwrite option
td_upload_embulk("mydb", "iris", iris, "/path/to/embulk", overwrite = TRUE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab