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: str, project_id: str, name: str)¶ 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: -
delete
()¶ Delete a connector from the actual [client] workspace.
Raises: PrevisionException
– If the connector does not existrequests.exceptions.ConnectionError
– Error processing the request
-
classmethod
list
(project_id: str, all: bool = 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: Returns: Fetched connector objects
Return type: list(
Connector
)
-
-
class
previsionio.connector.
DataFileBaseConnector
(_id: str, project_id: str, name: str, host: str, port: int, username: str)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a database client (containing files), and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- project_id (str) – Unique reference of the project id on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- username (str) – Username to use connect to the remote data source
-
class
previsionio.connector.
DataTableBaseConnector
(_id: str, project_id: str, name: str, host: str, port: int, username: str)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a database client (containing databases and tables), and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- project_id (str) – Unique reference of the project id on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- username (str) – Username to use connect to the remote data source
-
class
previsionio.connector.
FTPConnector
(_id: str, project_id: str, name: str, host: str, port: int, username: str)¶ Bases:
previsionio.connector.DataFileBaseConnector
A specific type of connector to interact with a FTP client (containing files), and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- project_id (str) – Unique reference of the project id on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- username (str) – Username to use connect to the remote data source
-
class
previsionio.connector.
GCPConnector
(_id: str, project_id: str, name: str)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with a GCP database client (containing databases and tables or buckets), and easily get data snapshots using an associated
DataSource
resource).Parameters:
-
class
previsionio.connector.
GCloud
¶ Bases:
enum.Enum
Google services.
-
big_query
= 'BigQuery'¶ Google BigQuery
-
storage
= 'Storage'¶ Google Storage
-
-
class
previsionio.connector.
S3Connector
(_id: str, project_id: str, name: str, username: str)¶ Bases:
previsionio.connector.Connector
A specific type of connector to interact with an Amazon S3 client (containing buckets with files), and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- project_id (str) – Unique reference of the project id on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- username (str) – Username to use connect to the remote data source
-
class
previsionio.connector.
SFTPConnector
(_id: str, project_id: str, name: str, host: str, port: int, username: str)¶ Bases:
previsionio.connector.DataFileBaseConnector
A specific type of connector to interact with a secured FTP client (containing files), and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- project_id (str) – Unique reference of the project id on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- username (str) – Username to use connect to the remote data source
-
class
previsionio.connector.
SQLConnector
(_id: str, project_id: str, name: str, host: str, port: int, username: str)¶ Bases:
previsionio.connector.DataTableBaseConnector
A specific type of connector to interact with a SQL database client (containing databases and tables), and easily get data snapshots using an associated
DataSource
resource).Parameters: - _id (str) – Unique reference of the connector on the platform
- project_id (str) – Unique reference of the project id on the platform
- name (str) – Name of the connector
- host (str) – Url of the connector
- port (int) – Port of the connector
- username (str) – Username to use connect to the remote data source