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"),
hostname = pal::pkg_config_val("hostname"),
email = pal::pkg_config_val("email"),
password = pal::pkg_config_val("password"),
api_token = pal::pkg_config_val("api_token"),
quiet = FALSE
)
Arguments
- connection
Type-specific connection details for the data source. A list.
- type
Type of the data source. One of
"mssql"
,"mysql"
,"pg"
or"sqlite3"
.- hostname
NocoDB server hostname. A character scalar.
E-mail address of the NocoDB user to authenticate with.
- password
Password of the NocoDB user to authenticate with.
- api_token
NocoDB API token. Takes precedence over
email
andpassword
if provided.- quiet
Whether or not to suppress printing status output from internal processing.
Details
Note that the PostgreSQL connection
parameters sslmode
and database
have no effect, i.e. are simply ignored by the API endpoint.
See also
Other functions to manage NocoDB base data sources:
create_data_src()
,
create_data_src_tbl()
,
data_src()
,
data_src_diff()
,
data_src_id()
,
data_src_tbls()
,
data_srcs()
,
delete_data_src()
,
has_data_src_diff()
,
sync_data_src()
,
update_data_src()
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"))} # }