Connector¶
In all the specific connectors, the parameters for the new()
method
are the same as the ones in the Connector._new()
.
-
class
previsionio.connector.
Connector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.api_resource.ApiResource
,previsionio.api_resource.UniqueResourceMixin
A connector to interact with a distant source of data (and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- conn_type (str) – Type of the connector, among “FTP”, “SFTP”, “SQL”, “S3”, “HIVE”, “HBASE”, “GCP”
- username (str, optional) – Username to use connect to the remote data source
- password (str, optional) – Password to use connect to the remote data source
-
classmethod
_new
(name, host, port, conn_type, username=None, password=None, googleCredentials=None)¶ Create a new connector object on the platform.
Parameters: - name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- conn_type (str) – Type of the connector, among “FTP”, “SFTP”, “SQL”, “S3”, “HIVE”, “HBASE” or “GCP”
- username (str, optional) – Username to use connect to the remote data source
- password (str, optional) – Password to use connect to the remote data source
Returns: Newly create connector object
Return type:
-
classmethod
list
(all=False)¶ List all the available connectors in the current active [client] workspace.
Warning
Contrary to the parent
list()
function, this method returns actualConnector
objects rather than plain dictionaries with the corresponding data.Parameters: all (boolean, optional) – Whether to force the SDK to load all items of the given type (by calling the paginated API several times). Else, the query will only return the first page of result. Returns: Fetched connector objects Return type: list( Connector
)
-
class
previsionio.connector.
DataBaseConnector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a database client (containing databases and tables).
-
class
previsionio.connector.
FTPConnector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a FTP client (containing files).
-
class
previsionio.connector.
GCPConnector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a GCP database client (containing databases and tables or buckets).
-
class
previsionio.connector.
HiveConnector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.DataBaseConnector
A specific type of connector to interact with a Hive database client (containing databases and tables).
-
class
previsionio.connector.
S3Connector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with an Amazon S3 client (containing buckets with files).
-
class
previsionio.connector.
SFTPConnector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a secured FTP client (containing files).
-
class
previsionio.connector.
SQLConnector
(_id, name, host=None, port=None, type=None, username='', password='', googleCredentials=None, **kwargs)¶ Bases:
previsionio.connector.DataBaseConnector
A specific type of connector to interact with a SQL database client (containing databases and tables).