Skip to content

data_sources

Rest API controller that operates on data sources that are not yet imported, testing connections or retrieving the metadata (schemas and tables).


get_remote_data_source_schemas

Introspects a list of schemas inside a remote data source, identified by an already imported connection.
Source code

GET

http://localhost:8888/api/datasource/connections/{connectionName}/schemas  

Return value

 Property name   Description                       Data type 
schema_remote_model List[SchemaRemoteModel]

Parameters of this method are described below

 Property name   Description                       Data type   Required 
connection_name Connection name string

Usage examples

curl http://localhost:8888/api/datasource/connections/sample_connection/schemas^
    -H "Accept: application/json"

get_remote_data_source_tables

Introspects the list of columns inside a schema on a remote data source that is identified by a connection that was added to DQOps.
Source code

GET

http://localhost:8888/api/datasource/connections/{connectionName}/schemas/{schemaName}/tables  

Return value

 Property name   Description                       Data type 
remote_table_list_model List[RemoteTableListModel]

Parameters of this method are described below

 Property name   Description                       Data type   Required 
connection_name Connection name string
schema_name Schema name string

Usage examples

curl http://localhost:8888/api/datasource/connections/sample_connection/schemas/sample_schema/tables^
    -H "Accept: application/json"

test_connection

Checks if the given remote connection could be opened and the credentials are valid
Source code

POST

http://localhost:8888/api/datasource/testconnection  

Return value

 Property name   Description                       Data type 
connection_test_model ConnectionTestModel

Parameters of this method are described below

 Property name   Description                       Data type   Required 
verify_name_uniqueness Verify if the connection name is unique, the default value is true boolean

Request body

 Description                       Data type   Required 
Basic connection model ConnectionModel

Usage examples

curl -X POST http://localhost:8888/api/datasource/testconnection^
    -H "Accept: application/json"^
    -H "Content-Type: application/json"^
    -d^
    "{\"connection_name\":\"sample_connection\",\"parallel_runs_limit\":4,\"provider_type\":\"postgresql\",\"postgresql\":{\"host\":\"localhost\",\"port\":\"5432\",\"database\":\"db\",\"user\":\"PASSWD\",\"sslmode\":\"disable\"},\"run_checks_job_template\":{\"connection\":\"sample_connection\",\"enabled\":true},\"run_profiling_checks_job_template\":{\"connection\":\"sample_connection\",\"enabled\":true,\"checkType\":\"profiling\"},\"run_monitoring_checks_job_template\":{\"connection\":\"sample_connection\",\"enabled\":true,\"checkType\":\"monitoring\"},\"run_partition_checks_job_template\":{\"connection\":\"sample_connection\",\"enabled\":true,\"checkType\":\"partitioned\"},\"collect_statistics_job_template\":{\"connection\":\"sample_connection\",\"enabled\":true,\"columnNames\":[]},\"data_clean_job_template\":{\"deleteErrors\":true,\"deleteStatistics\":true,\"deleteCheckResults\":true,\"deleteSensorReadouts\":true},\"can_edit\":false,\"can_collect_statistics\":true,\"can_run_checks\":true,\"can_delete_data\":true}"