fivetran-connector-sdk 0.11.13.2__py3-none-any.whl → 0.11.21.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fivetran_connector_sdk/__init__.py +29 -19
- {fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/METADATA +6 -5
- {fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/RECORD +6 -6
- {fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/WHEEL +1 -1
- {fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/entry_points.txt +0 -0
- {fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/top_level.txt +0 -0
@@ -25,13 +25,13 @@ from fivetran_connector_sdk.protos import common_pb2
|
|
25
25
|
from fivetran_connector_sdk.protos import connector_sdk_pb2
|
26
26
|
from fivetran_connector_sdk.protos import connector_sdk_pb2_grpc
|
27
27
|
|
28
|
-
__version__ = "0.11.
|
28
|
+
__version__ = "0.11.21.1"
|
29
29
|
|
30
30
|
MAC_OS = "mac"
|
31
31
|
WIN_OS = "windows"
|
32
32
|
LINUX_OS = "linux"
|
33
33
|
|
34
|
-
TESTER_VERSION = "0.24.
|
34
|
+
TESTER_VERSION = "0.24.1113.001"
|
35
35
|
TESTER_FILENAME = "run_sdk_tester.jar"
|
36
36
|
VERSION_FILENAME = "version.txt"
|
37
37
|
UPLOAD_FILENAME = "code.zip"
|
@@ -249,7 +249,7 @@ def check_newer_version():
|
|
249
249
|
if (int(time.time()) - timestamp) < ONE_DAY_IN_SEC:
|
250
250
|
return
|
251
251
|
|
252
|
-
for
|
252
|
+
for index in range(MAX_RETRIES):
|
253
253
|
try:
|
254
254
|
# check version and save current time
|
255
255
|
response = rq.get(PYPI_PACKAGE_DETAILS_URL)
|
@@ -264,7 +264,9 @@ def check_newer_version():
|
|
264
264
|
f_out.write(f"{int(time.time())}")
|
265
265
|
break
|
266
266
|
except Exception:
|
267
|
-
|
267
|
+
retry_after = 2 ** index
|
268
|
+
print(f"WARNING: Unable to check if a newer version of `fivetran-connector-sdk` is available. Retrying again after {retry_after} seconds")
|
269
|
+
time.sleep(retry_after)
|
268
270
|
|
269
271
|
|
270
272
|
def _tester_root_dir() -> str:
|
@@ -606,11 +608,12 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
606
608
|
return requirements
|
607
609
|
|
608
610
|
# Call this method to deploy the connector to Fivetran platform
|
609
|
-
def deploy(self, project_path: str, deploy_key: str, group: str, connection: str, configuration: dict = None):
|
611
|
+
def deploy(self, project_path: str, force: bool, deploy_key: str, group: str, connection: str, configuration: dict = None):
|
610
612
|
"""Deploys the connector to the Fivetran platform.
|
611
613
|
|
612
614
|
Args:
|
613
615
|
project_path (str): The path to the connector project.
|
616
|
+
force (bool): Force update an existing connection.
|
614
617
|
deploy_key (str): The deployment key.
|
615
618
|
group (str): The group name.
|
616
619
|
connection (str): The connection name.
|
@@ -642,20 +645,25 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
642
645
|
print(
|
643
646
|
f"SEVERE: The connection '{connection}' already exists and does not use the 'Connector SDK' service. You cannot update this connection.")
|
644
647
|
os._exit(1)
|
645
|
-
confirm = input(
|
646
|
-
f"The connection '{connection}' already exists in the destination '{group}'. Updating it will overwrite the existing code and configuration. Do you want to proceed with the update? (Y/N): ")
|
647
|
-
if confirm.lower() == "y":
|
648
|
-
print("INFO: Updating the connection...\n")
|
649
|
-
self.__upload_project(
|
650
|
-
project_path, deploy_key, group_id, group_name, connection)
|
651
|
-
self.__update_connection(
|
652
|
-
connection_id, connection, group_name, connection_config, deploy_key)
|
653
|
-
print("✓")
|
654
|
-
print(
|
655
|
-
f"INFO: Visit the Fivetran dashboard to manage the connection: https://fivetran.com/dashboard/connectors/{connection_id}/status")
|
656
648
|
else:
|
657
|
-
|
658
|
-
|
649
|
+
if force:
|
650
|
+
confirm = "y"
|
651
|
+
else:
|
652
|
+
confirm = input(
|
653
|
+
f"The connection '{connection}' already exists in the destination '{group}'. Updating it will overwrite the existing code and configuration. Do you want to proceed with the update? (Y/N): ")
|
654
|
+
if confirm.lower() == "y":
|
655
|
+
print("INFO: Updating the connection...\n")
|
656
|
+
self.__upload_project(
|
657
|
+
project_path, deploy_key, group_id, group_name, connection)
|
658
|
+
self.__update_connection(
|
659
|
+
connection_id, connection, group_name, connection_config, deploy_key)
|
660
|
+
print("✓")
|
661
|
+
print(f"INFO: Connector ID: {connection_id}")
|
662
|
+
print(
|
663
|
+
f"INFO: Visit the Fivetran dashboard to manage the connection: https://fivetran.com/dashboard/connectors/{connection_id}/status")
|
664
|
+
else:
|
665
|
+
print("INFO: Update canceled. The process is now terminating.")
|
666
|
+
os._exit(1)
|
659
667
|
else:
|
660
668
|
self.__upload_project(project_path, deploy_key,
|
661
669
|
group_id, group_name, connection)
|
@@ -665,6 +673,7 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
665
673
|
print(
|
666
674
|
f"INFO: The connection '{connection}' has been created successfully.\n")
|
667
675
|
connection_id = response.json()['data']['id']
|
676
|
+
print(f"INFO: Connector ID: {connection_id}")
|
668
677
|
print(
|
669
678
|
f"INFO: Visit the Fivetran dashboard to start the initial sync: https://fivetran.com/dashboard/connectors/{connection_id}/status")
|
670
679
|
else:
|
@@ -1375,6 +1384,7 @@ def main():
|
|
1375
1384
|
parser.add_argument("--api-key", type=str, default=None, help="Provide api key for deployment to production")
|
1376
1385
|
parser.add_argument("--destination", type=str, default=None, help="Destination name (aka 'group name')")
|
1377
1386
|
parser.add_argument("--connection", type=str, default=None, help="Connection name (aka 'destination schema')")
|
1387
|
+
parser.add_argument("-f", "--force", action="store_true", help="Force update an existing connection")
|
1378
1388
|
|
1379
1389
|
args = parser.parse_args()
|
1380
1390
|
|
@@ -1397,7 +1407,7 @@ def main():
|
|
1397
1407
|
if args.command.lower() == "deploy":
|
1398
1408
|
if args.state:
|
1399
1409
|
print("WARNING: 'state' parameter is not used for 'deploy' command")
|
1400
|
-
connector_object.deploy(args.project_path, ft_deploy_key, ft_group, ft_connection, configuration)
|
1410
|
+
connector_object.deploy(args.project_path, args.force, ft_deploy_key, ft_group, ft_connection, configuration)
|
1401
1411
|
|
1402
1412
|
elif args.command.lower() == "debug":
|
1403
1413
|
connector_object.debug(args.project_path, configuration, state)
|
{fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/METADATA
RENAMED
@@ -1,19 +1,20 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fivetran_connector_sdk
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.21.1
|
4
4
|
Summary: Build custom connectors on Fivetran platform
|
5
5
|
Author-email: Fivetran <developers@fivetran.com>
|
6
6
|
Project-URL: Homepage, https://fivetran.com/docs/connectors/connector-sdk
|
7
7
|
Project-URL: Github, https://github.com/fivetran/fivetran_connector_sdk
|
8
|
+
Project-URL: Changelog, https://fivetran.com/docs/connectors/connector-sdk/changelog
|
8
9
|
Classifier: Programming Language :: Python :: 3
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
10
11
|
Classifier: Operating System :: OS Independent
|
11
12
|
Requires-Python: >=3.9
|
12
13
|
Description-Content-Type: text/markdown
|
13
|
-
Requires-Dist: grpcio
|
14
|
-
Requires-Dist: grpcio-tools
|
15
|
-
Requires-Dist: requests
|
16
|
-
Requires-Dist: pipreqs
|
14
|
+
Requires-Dist: grpcio==1.60.1
|
15
|
+
Requires-Dist: grpcio-tools==1.60.1
|
16
|
+
Requires-Dist: requests==2.32.3
|
17
|
+
Requires-Dist: pipreqs==0.5.0
|
17
18
|
|
18
19
|
# **fivetran-connector-sdk**
|
19
20
|
[](https://pepy.tech/project/fivetran-connector-sdk)
|
{fivetran_connector_sdk-0.11.13.2.dist-info → fivetran_connector_sdk-0.11.21.1.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
fivetran_connector_sdk/__init__.py,sha256=
|
1
|
+
fivetran_connector_sdk/__init__.py,sha256=P3Qolsvkfvrj1fAHAvkirN1dFQyZTA1sHYrLGYQUdn4,58853
|
2
2
|
fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
fivetran_connector_sdk/protos/common_pb2.py,sha256=kUwVcyZHgLigNR-KnHZn7dHrlxaMnUXqzprsRx6T72M,6831
|
4
4
|
fivetran_connector_sdk/protos/common_pb2.pyi,sha256=S0hdIzoXyyOKD5cjiGeDDLYpQ9J3LjAvu4rCj1JvJWE,9038
|
@@ -6,8 +6,8 @@ fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
|
|
6
6
|
fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=9Ke_Ti1s0vAeXapfXT-EryrT2-TSGQb8mhs4gxTpUMk,7732
|
7
7
|
fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=FWYxRgshEF3QDYAE0TM_mv4N2gGvkxCH_uPpxnMc4oA,8406
|
8
8
|
fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=ZfJLp4DW7uP4pFOZ74s_wQ6tD3eIPi-08UfnLwe4tzo,7163
|
9
|
-
fivetran_connector_sdk-0.11.
|
10
|
-
fivetran_connector_sdk-0.11.
|
11
|
-
fivetran_connector_sdk-0.11.
|
12
|
-
fivetran_connector_sdk-0.11.
|
13
|
-
fivetran_connector_sdk-0.11.
|
9
|
+
fivetran_connector_sdk-0.11.21.1.dist-info/METADATA,sha256=VaZkhj5RbDVaazn5dBWHNkJJk2jvDx96FOokLyLo7Zc,2939
|
10
|
+
fivetran_connector_sdk-0.11.21.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
11
|
+
fivetran_connector_sdk-0.11.21.1.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
|
12
|
+
fivetran_connector_sdk-0.11.21.1.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
|
13
|
+
fivetran_connector_sdk-0.11.21.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|