fivetran-connector-sdk 0.6.6.2__py3-none-any.whl → 0.6.6.3__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.
@@ -390,7 +390,7 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
390
390
  headers={"Authorization": f"Basic {deploy_key}"})
391
391
 
392
392
  if not resp.ok:
393
- print(f"ERROR: Unable to fetch list of groups, status code = {resp.status_code}")
393
+ print(f"ERROR: Unable to fetch list of destination names, status code = {resp.status_code}")
394
394
  os._exit(1)
395
395
 
396
396
  # TODO: Do we need to implement pagination?
@@ -403,14 +403,14 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
403
403
  return groups[0]['id'], groups[0]['name']
404
404
  else:
405
405
  if not group:
406
- print("ERROR: Group name is required when there are multiple destinations in the account")
406
+ print("ERROR: Destination name is required when there are multiple destinations in the account")
407
407
  os._exit(1)
408
408
 
409
409
  for grp in groups:
410
410
  if grp['name'] == group:
411
411
  return grp['id'], grp['name']
412
412
 
413
- print(f"ERROR: Specified group was not found in the account: {group}")
413
+ print(f"ERROR: Specified destination was not found in the account: {group}")
414
414
  os._exit(1)
415
415
 
416
416
  # Call this method to run the connector in production
@@ -656,9 +656,9 @@ def main():
656
656
  # Optional (Not all of these are valid with every mutually exclusive option below)
657
657
  parser.add_argument("--port", type=int, default=None, help="Provide port number to run gRPC server")
658
658
  parser.add_argument("--state", type=str, default=None, help="Provide state as JSON string or file")
659
- parser.add_argument("--configuration", type=str, default=None, help="Provide secrets as JSON string or file")
659
+ parser.add_argument("--configuration", type=str, default=None, help="Provide secrets as JSON file")
660
660
  parser.add_argument("--deploy-key", type=str, default=None, help="Provide deploy key")
661
- parser.add_argument("--group", type=str, default=None, help="Group name of the destination")
661
+ parser.add_argument("--destination", type=str, default=None, help="Destination name (aka 'group name')")
662
662
  parser.add_argument("--connection", type=str, default=None, help="Connection name (aka 'destination schema')")
663
663
 
664
664
  args = parser.parse_args()
@@ -666,10 +666,10 @@ def main():
666
666
  connector_object = find_connector_object(args.project_path)
667
667
 
668
668
  # Process optional args
669
- ft_group = args.group if args.group else os.getenv('GROUP', None)
669
+ ft_group = args.destination if args.destination else os.getenv('DESTINATION', None)
670
670
  ft_connection = args.connection if args.connection else os.getenv('CONNECTION', None)
671
671
  deploy_key = args.deploy_key if args.deploy_key else os.getenv('DEPLOY_KEY', None)
672
- configuration = args.configuration if args.configuration else os.getenv('CONFIGURATION', None)
672
+ configuration = args.configuration if args.configuration else None
673
673
  state = args.state if args.state else os.getenv('STATE', None)
674
674
 
675
675
  if configuration:
@@ -678,10 +678,7 @@ def main():
678
678
  with open(json_filepath, 'r') as fi:
679
679
  configuration = json.load(fi)
680
680
  else:
681
- if configuration.lstrip().startswith("{"):
682
- configuration = json.loads(configuration)
683
- else:
684
- raise ValueError("Unrecognized format for configuration")
681
+ raise ValueError("Configuration is not a JSON file")
685
682
  else:
686
683
  configuration = {}
687
684
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fivetran_connector_sdk
3
- Version: 0.6.6.2
3
+ Version: 0.6.6.3
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/connector-sdk
@@ -1,4 +1,4 @@
1
- fivetran_connector_sdk/__init__.py,sha256=G6lTHgjIq02-xop9DBMEVhZgf0vxmLxPKiaRbuTS5II,29683
1
+ fivetran_connector_sdk/__init__.py,sha256=ABQpcMDfa5cS4l32jnpaUygznAiybwFJ46Amjaody10,29558
2
2
  fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  fivetran_connector_sdk/protos/common_pb2.py,sha256=L4eHLGQAeoEUotWnEGhGHke_gkxZC46oBbB6oW_pcyA,8028
4
4
  fivetran_connector_sdk/protos/common_pb2.pyi,sha256=R_DpVfydkE5POi_GW94QTWmcIOTZBfC762Omb7hVcKU,10888
@@ -6,9 +6,9 @@ fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
6
6
  fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=8tpwfD6mxbe09u3pOZGHdEGXU99WShyKeaK0A3-afOY,7021
7
7
  fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=7mUA0lBLe0fcKcTSo04D_w-UIqfMvgjP44fKkaBQcvI,7437
8
8
  fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=AerM3GHYVHWPJW0AZilOaWuFlLSgtX733PcMC7iFs9Y,7287
9
- fivetran_connector_sdk-0.6.6.2.dist-info/LICENSE,sha256=Kutp3D0T7HmHuBifKmbw39OZLAL1ckaLRb8u9lyJxE8,1065
10
- fivetran_connector_sdk-0.6.6.2.dist-info/METADATA,sha256=r3Sb-CE_3UH6ShnW5KfHadoIOfMs77urkBMEAfYeuQc,639
11
- fivetran_connector_sdk-0.6.6.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
12
- fivetran_connector_sdk-0.6.6.2.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
13
- fivetran_connector_sdk-0.6.6.2.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
14
- fivetran_connector_sdk-0.6.6.2.dist-info/RECORD,,
9
+ fivetran_connector_sdk-0.6.6.3.dist-info/LICENSE,sha256=Kutp3D0T7HmHuBifKmbw39OZLAL1ckaLRb8u9lyJxE8,1065
10
+ fivetran_connector_sdk-0.6.6.3.dist-info/METADATA,sha256=vl8YgsJmVm2vP2ZzVIS0T7t2XN1DjOCzgHWdYwyUlPo,639
11
+ fivetran_connector_sdk-0.6.6.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
12
+ fivetran_connector_sdk-0.6.6.3.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
13
+ fivetran_connector_sdk-0.6.6.3.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
14
+ fivetran_connector_sdk-0.6.6.3.dist-info/RECORD,,