Skip to contents

Tests a data source's connection details via a NocoDB server's POST /api/v2/meta/connection/test API endpoint.

Usage

test_data_src(
  connection,
  type = c("mssql", "mysql", "pg", "sqlite3"),
  origin = pal::pkg_config_val("origin"),
  email = pal::pkg_config_val("email"),
  password = pal::pkg_config_val("password"),
  api_token = pal::pkg_config_val("api_token"),
  quiet = FALSE
)

Arguments

connection

list()
Type-specific connection details for the data source.

type

character(1)
Type of the data source. One of "mssql", "mysql", "pg" or "sqlite3".

origin

character(1)
NocoDB server origin.

email

character(1)
E-mail address of the NocoDB user to authenticate with.

password

character(1)
Password of the NocoDB user to authenticate with.

api_token

character(1)
NocoDB API token. Takes precedence over email and password if provided.

quiet

logical(1)
Whether or not to suppress printing status output from internal processing.

Value

A logical scalar indicating whether the connection test was successful or not.

Details

Note that the PostgreSQL connection parameters sslmode and database have no effect, i.e. are simply ignored by the API endpoint.

See also

Examples

if (FALSE) { # \dontrun{
nocodb::test_data_src(type = "pg",
                      connection = list(host = "REPLACE-ME",
                                        port = 5432L,
                                        ssl = TRUE,
                                        user = "REPLACE-ME",
                                        password = "REPLACE-ME"))} # }