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 = funky::config_val("origin"),
email = funky::config_val("email"),
password = funky::config_val("password"),
api_token = funky::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.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 overemailandpasswordif provided.- quiet
logical(1)
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"))} # }