create_datasource {previsionio}R Documentation

Create a new datasource If check_if_exist is enabled, the function will check if a datasource with the same name already exists. If yes, it will return a message and the information of the existing datasource instead of creating a new one.

Description

Create a new datasource If check_if_exist is enabled, the function will check if a datasource with the same name already exists. If yes, it will return a message and the information of the existing datasource instead of creating a new one.

Usage

create_datasource(
  project_id,
  connector_id,
  name,
  path = "",
  database = "",
  table = "",
  bucket = "",
  request = "",
  check_if_exist = FALSE
)

Arguments

project_id

id of the project, can be obtained with get_projects().

connector_id

connector_id linked to the datasource.

name

datasource name.

path

datasource path (for SFTP & FTP connector).

database

datasource database (for SQL connector).

table

datasource table (for SQL connector).

bucket

datasource bucket (for S3 connector).

request

datasource request (for SQLconnector).

check_if_exist

boolean (FALSE by default). If TRUE, makes extra checks to see if a datasource with the same name is already existing.

Value

list - parsed content of the datasource.


[Package previsionio version 11.7.0 Index]