fivetran-connector-sdk 0.6.6.3__py3-none-any.whl → 0.7.11.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 +131 -61
- fivetran_connector_sdk/protos/common_pb2.py +44 -49
- fivetran_connector_sdk/protos/common_pb2.pyi +30 -66
- fivetran_connector_sdk/protos/connector_sdk_pb2.py +52 -45
- fivetran_connector_sdk/protos/connector_sdk_pb2.pyi +44 -18
- fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py +16 -17
- {fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/METADATA +2 -2
- fivetran_connector_sdk-0.7.11.1.dist-info/RECORD +14 -0
- {fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/WHEEL +1 -1
- fivetran_connector_sdk-0.6.6.3.dist-info/RECORD +0 -14
- {fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/LICENSE +0 -0
- {fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/entry_points.txt +0 -0
- {fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/top_level.txt +0 -0
@@ -6,8 +6,10 @@ import json
|
|
6
6
|
import os
|
7
7
|
import platform
|
8
8
|
import requests as rq
|
9
|
+
import shutil
|
9
10
|
import subprocess
|
10
11
|
import sys
|
12
|
+
import traceback
|
11
13
|
|
12
14
|
from concurrent import futures
|
13
15
|
from datetime import datetime
|
@@ -22,7 +24,7 @@ MAC_OS = "mac"
|
|
22
24
|
WIN_OS = "windows"
|
23
25
|
LINUX_OS = "linux"
|
24
26
|
|
25
|
-
TESTER_VERSION = "
|
27
|
+
TESTER_VERSION = "0.24.0711.001"
|
26
28
|
TESTER_FILENAME = "sdk_connector_tester.jar"
|
27
29
|
VERSION_FILENAME = "version.txt"
|
28
30
|
UPLOAD_FILENAME = "code.zip"
|
@@ -35,6 +37,27 @@ DEBUGGING = False
|
|
35
37
|
TABLES = {}
|
36
38
|
|
37
39
|
|
40
|
+
class Logging:
|
41
|
+
@staticmethod
|
42
|
+
def __log(level: str, message: str):
|
43
|
+
if DEBUGGING:
|
44
|
+
print(message)
|
45
|
+
else:
|
46
|
+
print(f'{{"level":"{level}", "message": "{message}", "message-origin": "connector_sdk"}}')
|
47
|
+
|
48
|
+
@staticmethod
|
49
|
+
def info(message: str):
|
50
|
+
Logging.__log("INFO", message)
|
51
|
+
|
52
|
+
@staticmethod
|
53
|
+
def warning(message: str):
|
54
|
+
Logging.__log("WARNING", message)
|
55
|
+
|
56
|
+
@staticmethod
|
57
|
+
def severe(message: str):
|
58
|
+
Logging.__log("SEVERE", message)
|
59
|
+
|
60
|
+
|
38
61
|
class Operations:
|
39
62
|
@staticmethod
|
40
63
|
def upsert(table: str, data: dict) -> list[connector_sdk_pb2.UpdateResponse]:
|
@@ -52,19 +75,21 @@ class Operations:
|
|
52
75
|
TABLES[table] = new_table
|
53
76
|
|
54
77
|
responses.append(connector_sdk_pb2.UpdateResponse(
|
55
|
-
|
56
|
-
|
78
|
+
operation=connector_sdk_pb2.Operation(
|
79
|
+
schema_change=connector_sdk_pb2.SchemaChange(
|
80
|
+
without_schema=common_pb2.TableList(tables=[new_table])))))
|
57
81
|
|
58
82
|
mapped_data = _map_data_to_columns(data, columns)
|
59
83
|
record = connector_sdk_pb2.Record(
|
60
84
|
schema_name=None,
|
61
85
|
table_name=table,
|
62
|
-
type=common_pb2.
|
86
|
+
type=common_pb2.OpType.UPSERT,
|
63
87
|
data=mapped_data
|
64
88
|
)
|
65
89
|
|
66
90
|
responses.append(
|
67
|
-
connector_sdk_pb2.UpdateResponse(
|
91
|
+
connector_sdk_pb2.UpdateResponse(
|
92
|
+
operation=connector_sdk_pb2.Operation(record=record)))
|
68
93
|
|
69
94
|
return responses
|
70
95
|
|
@@ -77,11 +102,12 @@ class Operations:
|
|
77
102
|
record = connector_sdk_pb2.Record(
|
78
103
|
schema_name=None,
|
79
104
|
table_name=table,
|
80
|
-
type=common_pb2.
|
105
|
+
type=common_pb2.OpType.UPDATE,
|
81
106
|
data=mapped_data
|
82
107
|
)
|
83
108
|
|
84
|
-
return connector_sdk_pb2.UpdateResponse(
|
109
|
+
return connector_sdk_pb2.UpdateResponse(
|
110
|
+
operation=connector_sdk_pb2.Operation(record=record))
|
85
111
|
|
86
112
|
@staticmethod
|
87
113
|
def delete(table: str, keys: dict) -> connector_sdk_pb2.UpdateResponse:
|
@@ -92,18 +118,20 @@ class Operations:
|
|
92
118
|
record = connector_sdk_pb2.Record(
|
93
119
|
schema_name=None,
|
94
120
|
table_name=table,
|
95
|
-
type=common_pb2.
|
121
|
+
type=common_pb2.OpType.DELETE,
|
96
122
|
data=mapped_data
|
97
123
|
)
|
98
124
|
|
99
|
-
return connector_sdk_pb2.UpdateResponse(
|
125
|
+
return connector_sdk_pb2.UpdateResponse(
|
126
|
+
operation=connector_sdk_pb2.Operation(record=record))
|
127
|
+
|
100
128
|
|
101
129
|
@staticmethod
|
102
130
|
def checkpoint(state: dict) -> connector_sdk_pb2.UpdateResponse:
|
103
131
|
_yield_check(inspect.stack())
|
104
132
|
return connector_sdk_pb2.UpdateResponse(
|
105
|
-
checkpoint=connector_sdk_pb2.Checkpoint(
|
106
|
-
state_json=json.dumps(state)))
|
133
|
+
operation=connector_sdk_pb2.Operation(checkpoint=connector_sdk_pb2.Checkpoint(
|
134
|
+
state_json=json.dumps(state))))
|
107
135
|
|
108
136
|
|
109
137
|
def _get_columns(table: str) -> dict:
|
@@ -230,7 +258,7 @@ def _check_dict(incoming: dict, string_only: bool = False):
|
|
230
258
|
return incoming
|
231
259
|
|
232
260
|
|
233
|
-
class Connector(connector_sdk_pb2_grpc.
|
261
|
+
class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
234
262
|
def __init__(self, update, schema=None):
|
235
263
|
self.schema_method = schema
|
236
264
|
self.update_method = update
|
@@ -238,6 +266,28 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
238
266
|
self.configuration = None
|
239
267
|
self.state = None
|
240
268
|
|
269
|
+
# Call this method to unpause and start a connector
|
270
|
+
def start(self, deploy_key: str, group: str, connection: str):
|
271
|
+
if not deploy_key: print("ERROR: Missing deploy key"); os._exit(1)
|
272
|
+
if not connection: print("ERROR: Missing connection name"); os._exit(1)
|
273
|
+
|
274
|
+
group_id, group_name = self.__get_group_info(group, deploy_key)
|
275
|
+
connection_id = self.__get_connection_id(connection, group, group_id, deploy_key)
|
276
|
+
if not self.__unpause_connection():
|
277
|
+
print(f"WARNING: Unable to unpause connection '{connection}'")
|
278
|
+
os._exit(1)
|
279
|
+
|
280
|
+
if not self.__force_sync(connection_id, connection, deploy_key):
|
281
|
+
print(f"WARNING: Unable to start sync on connection '{connection}'")
|
282
|
+
os._exit(1)
|
283
|
+
|
284
|
+
@staticmethod
|
285
|
+
def __unpause_connection(id: str, deploy_key: str) -> bool:
|
286
|
+
resp = rq.patch(f"https://api.fivetran.com/v1/connectors/{id}",
|
287
|
+
headers={"Authorization": f"Basic {deploy_key}"},
|
288
|
+
json={"force": True})
|
289
|
+
return resp.ok
|
290
|
+
|
241
291
|
# Call this method to deploy the connector to Fivetran platform
|
242
292
|
def deploy(self, project_path: str, deploy_key: str, group: str, connection: str, configuration: dict = None):
|
243
293
|
if not deploy_key: print("ERROR: Missing deploy key"); os._exit(1)
|
@@ -263,9 +313,8 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
263
313
|
os._exit(1)
|
264
314
|
connection_id = self.__get_connection_id(connection, group, group_id, deploy_key)
|
265
315
|
if connection_id:
|
266
|
-
print(f"Connection '{connection}' already exists in
|
316
|
+
print(f"Connection '{connection}' already exists in destination '{group}', updating .. ", end="", flush=True)
|
267
317
|
self.__update_connection(connection_id, connection, group_name, connection_config, deploy_key)
|
268
|
-
self.__force_sync(connection_id, connection, deploy_key)
|
269
318
|
print("✓")
|
270
319
|
else:
|
271
320
|
response = self.__create_connection(deploy_key, group_id, connection_config)
|
@@ -276,13 +325,11 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
276
325
|
os._exit(1)
|
277
326
|
|
278
327
|
@staticmethod
|
279
|
-
def __force_sync(id: str,
|
328
|
+
def __force_sync(id: str, deploy_key: str) -> bool:
|
280
329
|
resp = rq.post(f"https://api.fivetran.com/v1/connectors/{id}/sync",
|
281
330
|
headers={"Authorization": f"Basic {deploy_key}"},
|
282
331
|
json={"force": True})
|
283
|
-
|
284
|
-
if not resp.ok:
|
285
|
-
print(f"WARNING: Unable to start sync on connection '{name}'")
|
332
|
+
return resp.ok
|
286
333
|
|
287
334
|
@staticmethod
|
288
335
|
def __update_connection(id: str, name: str, group: str, config: dict, deploy_key: str):
|
@@ -319,7 +366,7 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
319
366
|
"group_id": group_id,
|
320
367
|
"service": "connector_sdk",
|
321
368
|
"config": config,
|
322
|
-
"paused":
|
369
|
+
"paused": True,
|
323
370
|
"run_setup_tests": True,
|
324
371
|
"sync_frequency": "360",
|
325
372
|
})
|
@@ -362,7 +409,7 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
362
409
|
|
363
410
|
@staticmethod
|
364
411
|
def __upload(local_path: str, deploy_key: str, group_id: str, connection: str) -> bool:
|
365
|
-
print("Uploading .. ", end="", flush=True)
|
412
|
+
print("Uploading project .. ", end="", flush=True)
|
366
413
|
response = rq.post(f"https://api.fivetran.com/v2/deploy/{group_id}/{connection}",
|
367
414
|
files={'file': open(local_path, 'rb')},
|
368
415
|
headers={"Authorization": f"Basic {deploy_key}"})
|
@@ -415,13 +462,11 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
415
462
|
|
416
463
|
# Call this method to run the connector in production
|
417
464
|
def run(self, port: int = 50051, configuration: dict = None, state: dict = None) -> grpc.Server:
|
418
|
-
global DEBUGGING
|
419
|
-
|
420
465
|
self.configuration = _check_dict(configuration, True)
|
421
466
|
self.state = _check_dict(state)
|
422
467
|
|
423
468
|
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
|
424
|
-
connector_sdk_pb2_grpc.
|
469
|
+
connector_sdk_pb2_grpc.add_ConnectorServicer_to_server(self, server)
|
425
470
|
server.add_insecure_port("[::]:" + str(port))
|
426
471
|
server.start()
|
427
472
|
print("Connector started, listening on " + str(port))
|
@@ -434,41 +479,57 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
434
479
|
global DEBUGGING
|
435
480
|
DEBUGGING = True
|
436
481
|
|
437
|
-
project_path = os.getcwd() if project_path is None else project_path
|
438
|
-
print(f"Debugging connector at: {project_path}")
|
439
|
-
|
440
482
|
os_name = self.__get_os_name()
|
441
483
|
tester_root_dir = os.path.join(os.path.expanduser("~"), ROOT_LOCATION)
|
442
484
|
java_exe = self.__java_exe(tester_root_dir, os_name)
|
443
|
-
|
444
|
-
# create folder in HOME directory
|
445
|
-
os.makedirs(tester_root_dir)
|
446
|
-
|
485
|
+
install_tester = False
|
447
486
|
version_file = os.path.join(tester_root_dir, VERSION_FILENAME)
|
448
487
|
if os.path.isfile(version_file):
|
449
|
-
#
|
450
|
-
|
488
|
+
# Check version number & update if different
|
489
|
+
with open(version_file, 'r') as fi:
|
490
|
+
current_version = fi.readline()
|
491
|
+
if current_version != TESTER_VERSION:
|
492
|
+
shutil.rmtree(tester_root_dir)
|
493
|
+
install_tester = True
|
451
494
|
else:
|
452
|
-
|
453
|
-
|
495
|
+
install_tester = True
|
496
|
+
|
497
|
+
if install_tester:
|
498
|
+
os.makedirs(tester_root_dir, exist_ok=True)
|
454
499
|
download_filename = f"sdk-connector-tester-{os_name}-{TESTER_VERSION}.zip"
|
455
500
|
download_filepath = os.path.join(tester_root_dir, download_filename)
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
print("✓")
|
501
|
+
try:
|
502
|
+
print(f"Downloading connector tester version {TESTER_VERSION} .. ", end="", flush=True)
|
503
|
+
download_url = f"https://github.com/fivetran/fivetran_sdk_tools/releases/download/{TESTER_VERSION}/{download_filename}"
|
504
|
+
r = rq.get(download_url)
|
505
|
+
if r.ok:
|
506
|
+
with open(download_filepath, 'wb') as fo:
|
507
|
+
fo.write(r.content)
|
508
|
+
else:
|
509
|
+
print(f"\nDownload failed, status code: {r.status_code}, url: {download_url}")
|
510
|
+
os._exit(1)
|
511
|
+
except:
|
512
|
+
print(f"\nSomething went wrong during download: {traceback.format_exc()}")
|
513
|
+
os._exit(1)
|
470
514
|
|
471
|
-
|
515
|
+
try:
|
516
|
+
# unzip it
|
517
|
+
with ZipFile(download_filepath, 'r') as z_object:
|
518
|
+
z_object.extractall(path=tester_root_dir)
|
519
|
+
# delete zip file
|
520
|
+
os.remove(download_filepath)
|
521
|
+
# make java binary executable
|
522
|
+
import stat
|
523
|
+
st = os.stat(java_exe)
|
524
|
+
os.chmod(java_exe, st.st_mode | stat.S_IEXEC)
|
525
|
+
print("✓")
|
526
|
+
except:
|
527
|
+
print(f"\nSomething went wrong during install: ", traceback.format_exc())
|
528
|
+
shutil.rmtree(tester_root_dir)
|
529
|
+
os._exit(1)
|
530
|
+
|
531
|
+
project_path = os.getcwd() if project_path is None else project_path
|
532
|
+
print(f"Debugging connector at: {project_path}")
|
472
533
|
server = self.run(port, configuration, state)
|
473
534
|
|
474
535
|
# Uncomment this to run the tester manually
|
@@ -479,9 +540,7 @@ class Connector(connector_sdk_pb2_grpc.SourceConnectorServicer):
|
|
479
540
|
print(f"Starting connector tester..")
|
480
541
|
for log_msg in self.__run_tester(java_exe, tester_root_dir, project_path):
|
481
542
|
print(log_msg, end="")
|
482
|
-
|
483
543
|
except:
|
484
|
-
import traceback
|
485
544
|
print(traceback.format_exc())
|
486
545
|
error = True
|
487
546
|
|
@@ -650,14 +709,14 @@ def main():
|
|
650
709
|
parser = argparse.ArgumentParser(allow_abbrev=False)
|
651
710
|
|
652
711
|
# Positional
|
653
|
-
parser.add_argument("command", help="debug|run|deploy")
|
712
|
+
parser.add_argument("command", help="debug|run|deploy|start")
|
654
713
|
parser.add_argument("project_path", nargs='?', default=os.getcwd(), help="Path to connector project directory")
|
655
714
|
|
656
715
|
# Optional (Not all of these are valid with every mutually exclusive option below)
|
657
716
|
parser.add_argument("--port", type=int, default=None, help="Provide port number to run gRPC server")
|
658
717
|
parser.add_argument("--state", type=str, default=None, help="Provide state as JSON string or file")
|
659
718
|
parser.add_argument("--configuration", type=str, default=None, help="Provide secrets as JSON file")
|
660
|
-
parser.add_argument("--
|
719
|
+
parser.add_argument("--api-key", type=str, default=None, help="Provide api key for deployment to production")
|
661
720
|
parser.add_argument("--destination", type=str, default=None, help="Destination name (aka 'group name')")
|
662
721
|
parser.add_argument("--connection", type=str, default=None, help="Connection name (aka 'destination schema')")
|
663
722
|
|
@@ -666,11 +725,11 @@ def main():
|
|
666
725
|
connector_object = find_connector_object(args.project_path)
|
667
726
|
|
668
727
|
# Process optional args
|
669
|
-
ft_group = args.destination if args.destination else os.getenv('
|
670
|
-
ft_connection = args.connection if args.connection else os.getenv('
|
671
|
-
|
728
|
+
ft_group = args.destination if args.destination else os.getenv('FIVETRAN_DESTINATION', None)
|
729
|
+
ft_connection = args.connection if args.connection else os.getenv('FIVETRAN_CONNECTION', None)
|
730
|
+
ft_deploy_key = args.api_key if args.api_key else os.getenv('FIVETRAN_API_KEY', None)
|
672
731
|
configuration = args.configuration if args.configuration else None
|
673
|
-
state = args.state if args.state else os.getenv('
|
732
|
+
state = args.state if args.state else os.getenv('FIVETRAN_STATE', None)
|
674
733
|
|
675
734
|
if configuration:
|
676
735
|
json_filepath = os.path.join(args.project_path, args.configuration)
|
@@ -678,7 +737,7 @@ def main():
|
|
678
737
|
with open(json_filepath, 'r') as fi:
|
679
738
|
configuration = json.load(fi)
|
680
739
|
else:
|
681
|
-
raise ValueError("Configuration
|
740
|
+
raise ValueError("Configuration needs to be a JSON file")
|
682
741
|
else:
|
683
742
|
configuration = {}
|
684
743
|
|
@@ -697,15 +756,26 @@ def main():
|
|
697
756
|
print("WARNING: 'port' parameter is not used for 'deploy' command")
|
698
757
|
if args.state:
|
699
758
|
print("WARNING: 'state' parameter is not used for 'deploy' command")
|
700
|
-
connector_object.deploy(args.project_path,
|
759
|
+
connector_object.deploy(args.project_path, ft_deploy_key, ft_group, ft_connection, configuration)
|
760
|
+
|
761
|
+
elif args.command.lower() == "start":
|
762
|
+
if args.port:
|
763
|
+
print("WARNING: 'port' parameter is not used for 'deploy' command")
|
764
|
+
if args.state:
|
765
|
+
print("WARNING: 'state' parameter is not used for 'deploy' command")
|
766
|
+
connector_object.start(ft_deploy_key, ft_group, ft_connection)
|
701
767
|
|
702
768
|
elif args.command.lower() == "debug":
|
703
769
|
port = 50051 if not args.port else args.port
|
704
770
|
connector_object.debug(args.project_path, port, configuration, state)
|
705
771
|
|
706
772
|
elif args.command.lower() == "run":
|
707
|
-
|
708
|
-
|
773
|
+
try:
|
774
|
+
port = 50051 if not args.port else args.port
|
775
|
+
connector_object.run(port, configuration, state)
|
776
|
+
except:
|
777
|
+
Logging.severe(traceback.format_exc())
|
778
|
+
os._exit(1)
|
709
779
|
|
710
780
|
else:
|
711
781
|
raise NotImplementedError("Invalid command: ", args.command)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# source: common.proto
|
4
|
+
# Protobuf Python Version: 4.25.0
|
4
5
|
"""Generated protocol buffer code."""
|
5
6
|
from google.protobuf import descriptor as _descriptor
|
6
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
@@ -14,58 +15,52 @@ _sym_db = _symbol_database.Default()
|
|
14
15
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x12\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x12\x0c\x66ivetran_sdk\x1a\x1fgoogle/protobuf/timestamp.proto\"\x1a\n\x18\x43onfigurationFormRequest\"\xbb\x01\n\x19\x43onfigurationFormResponse\x12\"\n\x1aschema_selection_supported\x18\x01 \x01(\x08\x12!\n\x19table_selection_supported\x18\x02 \x01(\x08\x12\'\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x17.fivetran_sdk.FormField\x12.\n\x05tests\x18\x04 \x03(\x0b\x32\x1f.fivetran_sdk.ConfigurationTest\"\x85\x02\n\tFormField\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x10\n\x08required\x18\x03 \x01(\x08\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tH\x01\x88\x01\x01\x12-\n\ntext_field\x18\x05 \x01(\x0e\x32\x17.fivetran_sdk.TextFieldH\x00\x12\x35\n\x0e\x64ropdown_field\x18\x06 \x01(\x0b\x32\x1b.fivetran_sdk.DropdownFieldH\x00\x12\x31\n\x0ctoggle_field\x18\x07 \x01(\x0b\x32\x19.fivetran_sdk.ToggleFieldH\x00\x42\x06\n\x04typeB\x0e\n\x0c_description\"\'\n\rDropdownField\x12\x16\n\x0e\x64ropdown_field\x18\x01 \x03(\t\"\r\n\x0bToggleField\"0\n\x11\x43onfigurationTest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\"\x96\x01\n\x0bTestRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x43\n\rconfiguration\x18\x02 \x03(\x0b\x32,.fivetran_sdk.TestRequest.ConfigurationEntry\x1a\x34\n\x12\x43onfigurationEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"@\n\x0cTestResponse\x12\x11\n\x07success\x18\x01 \x01(\x08H\x00\x12\x11\n\x07\x66\x61ilure\x18\x02 \x01(\tH\x00\x42\n\n\x08response\"3\n\nSchemaList\x12%\n\x07schemas\x18\x01 \x03(\x0b\x32\x14.fivetran_sdk.Schema\"0\n\tTableList\x12#\n\x06tables\x18\x01 \x03(\x0b\x32\x13.fivetran_sdk.Table\";\n\x06Schema\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x06tables\x18\x02 \x03(\x0b\x32\x13.fivetran_sdk.Table\"1\n\rDecimalParams\x12\x11\n\tprecision\x18\x01 \x01(\r\x12\r\n\x05scale\x18\x02 \x01(\r\"\xf9\x02\n\tValueType\x12\x0e\n\x04null\x18\x01 \x01(\x08H\x00\x12\x0e\n\x04\x62ool\x18\x02 \x01(\x08H\x00\x12\x0f\n\x05short\x18\x03 \x01(\x05H\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x0e\n\x04long\x18\x05 \x01(\x03H\x00\x12\x0f\n\x05\x66loat\x18\x06 \x01(\x02H\x00\x12\x10\n\x06\x64ouble\x18\x07 \x01(\x01H\x00\x12\x30\n\nnaive_date\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x34\n\x0enaive_datetime\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x32\n\x0cutc_datetime\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x11\n\x07\x64\x65\x63imal\x18\x0b \x01(\tH\x00\x12\x10\n\x06\x62inary\x18\x0c \x01(\x0cH\x00\x12\x10\n\x06string\x18\r \x01(\tH\x00\x12\x0e\n\x04json\x18\x0e \x01(\tH\x00\x12\r\n\x03xml\x18\x0f \x01(\tH\x00\x42\x07\n\x05inner\"<\n\x05Table\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x14.fivetran_sdk.Column\"\x90\x01\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x04type\x18\x02 \x01(\x0e\x32\x16.fivetran_sdk.DataType\x12\x13\n\x0bprimary_key\x18\x03 \x01(\x08\x12\x31\n\x07\x64\x65\x63imal\x18\x04 \x01(\x0b\x32\x1b.fivetran_sdk.DecimalParamsH\x00\x88\x01\x01\x42\n\n\x08_decimal*4\n\tTextField\x12\r\n\tPlainText\x10\x00\x12\x0c\n\x08Password\x10\x01\x12\n\n\x06Hidden\x10\x02*\xcb\x01\n\x08\x44\x61taType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\t\n\x05SHORT\x10\x02\x12\x07\n\x03INT\x10\x03\x12\x08\n\x04LONG\x10\x04\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0e\n\nNAIVE_DATE\x10\x08\x12\x12\n\x0eNAIVE_DATETIME\x10\t\x12\x10\n\x0cUTC_DATETIME\x10\n\x12\n\n\x06\x42INARY\x10\x0b\x12\x07\n\x03XML\x10\x0c\x12\n\n\x06STRING\x10\r\x12\x08\n\x04JSON\x10\x0e*:\n\x06OpType\x12\n\n\x06UPSERT\x10\x00\x12\n\n\x06UPDATE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x0c\n\x08TRUNCATE\x10\x03\x42\x1fH\x01P\x01Z\x19\x66ivetran.com/fivetran_sdkb\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
21
22
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common_pb2', _globals)
|
22
23
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
23
|
-
DESCRIPTOR._options = None
|
24
|
-
DESCRIPTOR._serialized_options = b'H\001P\001Z\
|
25
|
-
_TESTREQUEST_CONFIGURATIONENTRY._options = None
|
26
|
-
_TESTREQUEST_CONFIGURATIONENTRY._serialized_options = b'8\001'
|
27
|
-
_globals['_TEXTFIELD']._serialized_start=
|
28
|
-
_globals['_TEXTFIELD']._serialized_end=
|
29
|
-
_globals['_DATATYPE']._serialized_start=
|
30
|
-
_globals['_DATATYPE']._serialized_end=
|
31
|
-
_globals['
|
32
|
-
_globals['
|
33
|
-
_globals['_CONFIGURATIONFORMREQUEST']._serialized_start=
|
34
|
-
_globals['_CONFIGURATIONFORMREQUEST']._serialized_end=
|
35
|
-
_globals['_CONFIGURATIONFORMRESPONSE']._serialized_start=
|
36
|
-
_globals['_CONFIGURATIONFORMRESPONSE']._serialized_end=
|
37
|
-
_globals['_FORMFIELD']._serialized_start=
|
38
|
-
_globals['_FORMFIELD']._serialized_end=
|
39
|
-
_globals['
|
40
|
-
_globals['
|
41
|
-
_globals['
|
42
|
-
_globals['
|
43
|
-
_globals['
|
44
|
-
_globals['
|
45
|
-
_globals['
|
46
|
-
_globals['
|
47
|
-
_globals['
|
48
|
-
_globals['
|
49
|
-
_globals['
|
50
|
-
_globals['
|
51
|
-
_globals['
|
52
|
-
_globals['
|
53
|
-
_globals['
|
54
|
-
_globals['
|
55
|
-
_globals['
|
56
|
-
_globals['
|
57
|
-
_globals['
|
58
|
-
_globals['
|
59
|
-
_globals['
|
60
|
-
_globals['
|
61
|
-
_globals['
|
62
|
-
_globals['
|
63
|
-
_globals['
|
64
|
-
_globals['
|
65
|
-
_globals['_VALUETYPE']._serialized_start=1581
|
66
|
-
_globals['_VALUETYPE']._serialized_end=2008
|
67
|
-
_globals['_TABLE']._serialized_start=2010
|
68
|
-
_globals['_TABLE']._serialized_end=2073
|
69
|
-
_globals['_COLUMN']._serialized_start=2076
|
70
|
-
_globals['_COLUMN']._serialized_end=2226
|
24
|
+
_globals['DESCRIPTOR']._options = None
|
25
|
+
_globals['DESCRIPTOR']._serialized_options = b'H\001P\001Z\031fivetran.com/fivetran_sdk'
|
26
|
+
_globals['_TESTREQUEST_CONFIGURATIONENTRY']._options = None
|
27
|
+
_globals['_TESTREQUEST_CONFIGURATIONENTRY']._serialized_options = b'8\001'
|
28
|
+
_globals['_TEXTFIELD']._serialized_start=1674
|
29
|
+
_globals['_TEXTFIELD']._serialized_end=1726
|
30
|
+
_globals['_DATATYPE']._serialized_start=1729
|
31
|
+
_globals['_DATATYPE']._serialized_end=1932
|
32
|
+
_globals['_OPTYPE']._serialized_start=1934
|
33
|
+
_globals['_OPTYPE']._serialized_end=1992
|
34
|
+
_globals['_CONFIGURATIONFORMREQUEST']._serialized_start=63
|
35
|
+
_globals['_CONFIGURATIONFORMREQUEST']._serialized_end=89
|
36
|
+
_globals['_CONFIGURATIONFORMRESPONSE']._serialized_start=92
|
37
|
+
_globals['_CONFIGURATIONFORMRESPONSE']._serialized_end=279
|
38
|
+
_globals['_FORMFIELD']._serialized_start=282
|
39
|
+
_globals['_FORMFIELD']._serialized_end=543
|
40
|
+
_globals['_DROPDOWNFIELD']._serialized_start=545
|
41
|
+
_globals['_DROPDOWNFIELD']._serialized_end=584
|
42
|
+
_globals['_TOGGLEFIELD']._serialized_start=586
|
43
|
+
_globals['_TOGGLEFIELD']._serialized_end=599
|
44
|
+
_globals['_CONFIGURATIONTEST']._serialized_start=601
|
45
|
+
_globals['_CONFIGURATIONTEST']._serialized_end=649
|
46
|
+
_globals['_TESTREQUEST']._serialized_start=652
|
47
|
+
_globals['_TESTREQUEST']._serialized_end=802
|
48
|
+
_globals['_TESTREQUEST_CONFIGURATIONENTRY']._serialized_start=750
|
49
|
+
_globals['_TESTREQUEST_CONFIGURATIONENTRY']._serialized_end=802
|
50
|
+
_globals['_TESTRESPONSE']._serialized_start=804
|
51
|
+
_globals['_TESTRESPONSE']._serialized_end=868
|
52
|
+
_globals['_SCHEMALIST']._serialized_start=870
|
53
|
+
_globals['_SCHEMALIST']._serialized_end=921
|
54
|
+
_globals['_TABLELIST']._serialized_start=923
|
55
|
+
_globals['_TABLELIST']._serialized_end=971
|
56
|
+
_globals['_SCHEMA']._serialized_start=973
|
57
|
+
_globals['_SCHEMA']._serialized_end=1032
|
58
|
+
_globals['_DECIMALPARAMS']._serialized_start=1034
|
59
|
+
_globals['_DECIMALPARAMS']._serialized_end=1083
|
60
|
+
_globals['_VALUETYPE']._serialized_start=1086
|
61
|
+
_globals['_VALUETYPE']._serialized_end=1463
|
62
|
+
_globals['_TABLE']._serialized_start=1465
|
63
|
+
_globals['_TABLE']._serialized_end=1525
|
64
|
+
_globals['_COLUMN']._serialized_start=1528
|
65
|
+
_globals['_COLUMN']._serialized_end=1672
|
71
66
|
# @@protoc_insertion_point(module_scope)
|
@@ -8,13 +8,13 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
|
|
8
8
|
DESCRIPTOR: _descriptor.FileDescriptor
|
9
9
|
|
10
10
|
class TextField(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
11
|
-
__slots__ =
|
11
|
+
__slots__ = ()
|
12
12
|
PlainText: _ClassVar[TextField]
|
13
13
|
Password: _ClassVar[TextField]
|
14
14
|
Hidden: _ClassVar[TextField]
|
15
15
|
|
16
16
|
class DataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
17
|
-
__slots__ =
|
17
|
+
__slots__ = ()
|
18
18
|
UNSPECIFIED: _ClassVar[DataType]
|
19
19
|
BOOLEAN: _ClassVar[DataType]
|
20
20
|
SHORT: _ClassVar[DataType]
|
@@ -23,7 +23,6 @@ class DataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
23
23
|
DECIMAL: _ClassVar[DataType]
|
24
24
|
FLOAT: _ClassVar[DataType]
|
25
25
|
DOUBLE: _ClassVar[DataType]
|
26
|
-
NAIVE_TIME: _ClassVar[DataType]
|
27
26
|
NAIVE_DATE: _ClassVar[DataType]
|
28
27
|
NAIVE_DATETIME: _ClassVar[DataType]
|
29
28
|
UTC_DATETIME: _ClassVar[DataType]
|
@@ -32,12 +31,12 @@ class DataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
32
31
|
STRING: _ClassVar[DataType]
|
33
32
|
JSON: _ClassVar[DataType]
|
34
33
|
|
35
|
-
class
|
36
|
-
__slots__ =
|
37
|
-
UPSERT: _ClassVar[
|
38
|
-
UPDATE: _ClassVar[
|
39
|
-
DELETE: _ClassVar[
|
40
|
-
TRUNCATE: _ClassVar[
|
34
|
+
class OpType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
35
|
+
__slots__ = ()
|
36
|
+
UPSERT: _ClassVar[OpType]
|
37
|
+
UPDATE: _ClassVar[OpType]
|
38
|
+
DELETE: _ClassVar[OpType]
|
39
|
+
TRUNCATE: _ClassVar[OpType]
|
41
40
|
PlainText: TextField
|
42
41
|
Password: TextField
|
43
42
|
Hidden: TextField
|
@@ -49,7 +48,6 @@ LONG: DataType
|
|
49
48
|
DECIMAL: DataType
|
50
49
|
FLOAT: DataType
|
51
50
|
DOUBLE: DataType
|
52
|
-
NAIVE_TIME: DataType
|
53
51
|
NAIVE_DATE: DataType
|
54
52
|
NAIVE_DATETIME: DataType
|
55
53
|
UTC_DATETIME: DataType
|
@@ -57,17 +55,17 @@ BINARY: DataType
|
|
57
55
|
XML: DataType
|
58
56
|
STRING: DataType
|
59
57
|
JSON: DataType
|
60
|
-
UPSERT:
|
61
|
-
UPDATE:
|
62
|
-
DELETE:
|
63
|
-
TRUNCATE:
|
58
|
+
UPSERT: OpType
|
59
|
+
UPDATE: OpType
|
60
|
+
DELETE: OpType
|
61
|
+
TRUNCATE: OpType
|
64
62
|
|
65
63
|
class ConfigurationFormRequest(_message.Message):
|
66
|
-
__slots__ =
|
64
|
+
__slots__ = ()
|
67
65
|
def __init__(self) -> None: ...
|
68
66
|
|
69
67
|
class ConfigurationFormResponse(_message.Message):
|
70
|
-
__slots__ =
|
68
|
+
__slots__ = ("schema_selection_supported", "table_selection_supported", "fields", "tests")
|
71
69
|
SCHEMA_SELECTION_SUPPORTED_FIELD_NUMBER: _ClassVar[int]
|
72
70
|
TABLE_SELECTION_SUPPORTED_FIELD_NUMBER: _ClassVar[int]
|
73
71
|
FIELDS_FIELD_NUMBER: _ClassVar[int]
|
@@ -79,21 +77,11 @@ class ConfigurationFormResponse(_message.Message):
|
|
79
77
|
def __init__(self, schema_selection_supported: bool = ..., table_selection_supported: bool = ..., fields: _Optional[_Iterable[_Union[FormField, _Mapping]]] = ..., tests: _Optional[_Iterable[_Union[ConfigurationTest, _Mapping]]] = ...) -> None: ...
|
80
78
|
|
81
79
|
class FormField(_message.Message):
|
82
|
-
__slots__ =
|
83
|
-
SINGLE_FIELD_NUMBER: _ClassVar[int]
|
84
|
-
FIELD_SET_FIELD_NUMBER: _ClassVar[int]
|
85
|
-
single: Field
|
86
|
-
field_set: FieldSet
|
87
|
-
def __init__(self, single: _Optional[_Union[Field, _Mapping]] = ..., field_set: _Optional[_Union[FieldSet, _Mapping]] = ...) -> None: ...
|
88
|
-
|
89
|
-
class Field(_message.Message):
|
90
|
-
__slots__ = ["name", "label", "required", "description", "default_value", "placeholder", "text_field", "dropdown_field", "toggle_field"]
|
80
|
+
__slots__ = ("name", "label", "required", "description", "text_field", "dropdown_field", "toggle_field")
|
91
81
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
92
82
|
LABEL_FIELD_NUMBER: _ClassVar[int]
|
93
83
|
REQUIRED_FIELD_NUMBER: _ClassVar[int]
|
94
84
|
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
95
|
-
DEFAULT_VALUE_FIELD_NUMBER: _ClassVar[int]
|
96
|
-
PLACEHOLDER_FIELD_NUMBER: _ClassVar[int]
|
97
85
|
TEXT_FIELD_FIELD_NUMBER: _ClassVar[int]
|
98
86
|
DROPDOWN_FIELD_FIELD_NUMBER: _ClassVar[int]
|
99
87
|
TOGGLE_FIELD_FIELD_NUMBER: _ClassVar[int]
|
@@ -101,45 +89,23 @@ class Field(_message.Message):
|
|
101
89
|
label: str
|
102
90
|
required: bool
|
103
91
|
description: str
|
104
|
-
default_value: str
|
105
|
-
placeholder: str
|
106
92
|
text_field: TextField
|
107
93
|
dropdown_field: DropdownField
|
108
94
|
toggle_field: ToggleField
|
109
|
-
def __init__(self, name: _Optional[str] = ..., label: _Optional[str] = ..., required: bool = ..., description: _Optional[str] = ...,
|
110
|
-
|
111
|
-
class FieldSet(_message.Message):
|
112
|
-
__slots__ = ["fields", "condition"]
|
113
|
-
FIELDS_FIELD_NUMBER: _ClassVar[int]
|
114
|
-
CONDITION_FIELD_NUMBER: _ClassVar[int]
|
115
|
-
fields: _containers.RepeatedCompositeFieldContainer[FormField]
|
116
|
-
condition: VisibilityCondition
|
117
|
-
def __init__(self, fields: _Optional[_Iterable[_Union[FormField, _Mapping]]] = ..., condition: _Optional[_Union[VisibilityCondition, _Mapping]] = ...) -> None: ...
|
118
|
-
|
119
|
-
class VisibilityCondition(_message.Message):
|
120
|
-
__slots__ = ["field_name", "has_bool_value", "has_string_value", "has_any_value"]
|
121
|
-
FIELD_NAME_FIELD_NUMBER: _ClassVar[int]
|
122
|
-
HAS_BOOL_VALUE_FIELD_NUMBER: _ClassVar[int]
|
123
|
-
HAS_STRING_VALUE_FIELD_NUMBER: _ClassVar[int]
|
124
|
-
HAS_ANY_VALUE_FIELD_NUMBER: _ClassVar[int]
|
125
|
-
field_name: str
|
126
|
-
has_bool_value: bool
|
127
|
-
has_string_value: str
|
128
|
-
has_any_value: bool
|
129
|
-
def __init__(self, field_name: _Optional[str] = ..., has_bool_value: bool = ..., has_string_value: _Optional[str] = ..., has_any_value: bool = ...) -> None: ...
|
95
|
+
def __init__(self, name: _Optional[str] = ..., label: _Optional[str] = ..., required: bool = ..., description: _Optional[str] = ..., text_field: _Optional[_Union[TextField, str]] = ..., dropdown_field: _Optional[_Union[DropdownField, _Mapping]] = ..., toggle_field: _Optional[_Union[ToggleField, _Mapping]] = ...) -> None: ...
|
130
96
|
|
131
97
|
class DropdownField(_message.Message):
|
132
|
-
__slots__ =
|
98
|
+
__slots__ = ("dropdown_field",)
|
133
99
|
DROPDOWN_FIELD_FIELD_NUMBER: _ClassVar[int]
|
134
100
|
dropdown_field: _containers.RepeatedScalarFieldContainer[str]
|
135
101
|
def __init__(self, dropdown_field: _Optional[_Iterable[str]] = ...) -> None: ...
|
136
102
|
|
137
103
|
class ToggleField(_message.Message):
|
138
|
-
__slots__ =
|
104
|
+
__slots__ = ()
|
139
105
|
def __init__(self) -> None: ...
|
140
106
|
|
141
107
|
class ConfigurationTest(_message.Message):
|
142
|
-
__slots__ =
|
108
|
+
__slots__ = ("name", "label")
|
143
109
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
144
110
|
LABEL_FIELD_NUMBER: _ClassVar[int]
|
145
111
|
name: str
|
@@ -147,9 +113,9 @@ class ConfigurationTest(_message.Message):
|
|
147
113
|
def __init__(self, name: _Optional[str] = ..., label: _Optional[str] = ...) -> None: ...
|
148
114
|
|
149
115
|
class TestRequest(_message.Message):
|
150
|
-
__slots__ =
|
116
|
+
__slots__ = ("name", "configuration")
|
151
117
|
class ConfigurationEntry(_message.Message):
|
152
|
-
__slots__ =
|
118
|
+
__slots__ = ("key", "value")
|
153
119
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
154
120
|
VALUE_FIELD_NUMBER: _ClassVar[int]
|
155
121
|
key: str
|
@@ -162,7 +128,7 @@ class TestRequest(_message.Message):
|
|
162
128
|
def __init__(self, name: _Optional[str] = ..., configuration: _Optional[_Mapping[str, str]] = ...) -> None: ...
|
163
129
|
|
164
130
|
class TestResponse(_message.Message):
|
165
|
-
__slots__ =
|
131
|
+
__slots__ = ("success", "failure")
|
166
132
|
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
167
133
|
FAILURE_FIELD_NUMBER: _ClassVar[int]
|
168
134
|
success: bool
|
@@ -170,19 +136,19 @@ class TestResponse(_message.Message):
|
|
170
136
|
def __init__(self, success: bool = ..., failure: _Optional[str] = ...) -> None: ...
|
171
137
|
|
172
138
|
class SchemaList(_message.Message):
|
173
|
-
__slots__ =
|
139
|
+
__slots__ = ("schemas",)
|
174
140
|
SCHEMAS_FIELD_NUMBER: _ClassVar[int]
|
175
141
|
schemas: _containers.RepeatedCompositeFieldContainer[Schema]
|
176
142
|
def __init__(self, schemas: _Optional[_Iterable[_Union[Schema, _Mapping]]] = ...) -> None: ...
|
177
143
|
|
178
144
|
class TableList(_message.Message):
|
179
|
-
__slots__ =
|
145
|
+
__slots__ = ("tables",)
|
180
146
|
TABLES_FIELD_NUMBER: _ClassVar[int]
|
181
147
|
tables: _containers.RepeatedCompositeFieldContainer[Table]
|
182
148
|
def __init__(self, tables: _Optional[_Iterable[_Union[Table, _Mapping]]] = ...) -> None: ...
|
183
149
|
|
184
150
|
class Schema(_message.Message):
|
185
|
-
__slots__ =
|
151
|
+
__slots__ = ("name", "tables")
|
186
152
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
187
153
|
TABLES_FIELD_NUMBER: _ClassVar[int]
|
188
154
|
name: str
|
@@ -190,7 +156,7 @@ class Schema(_message.Message):
|
|
190
156
|
def __init__(self, name: _Optional[str] = ..., tables: _Optional[_Iterable[_Union[Table, _Mapping]]] = ...) -> None: ...
|
191
157
|
|
192
158
|
class DecimalParams(_message.Message):
|
193
|
-
__slots__ =
|
159
|
+
__slots__ = ("precision", "scale")
|
194
160
|
PRECISION_FIELD_NUMBER: _ClassVar[int]
|
195
161
|
SCALE_FIELD_NUMBER: _ClassVar[int]
|
196
162
|
precision: int
|
@@ -198,7 +164,7 @@ class DecimalParams(_message.Message):
|
|
198
164
|
def __init__(self, precision: _Optional[int] = ..., scale: _Optional[int] = ...) -> None: ...
|
199
165
|
|
200
166
|
class ValueType(_message.Message):
|
201
|
-
__slots__ =
|
167
|
+
__slots__ = ("null", "bool", "short", "int", "long", "float", "double", "naive_date", "naive_datetime", "utc_datetime", "decimal", "binary", "string", "json", "xml")
|
202
168
|
NULL_FIELD_NUMBER: _ClassVar[int]
|
203
169
|
BOOL_FIELD_NUMBER: _ClassVar[int]
|
204
170
|
SHORT_FIELD_NUMBER: _ClassVar[int]
|
@@ -206,7 +172,6 @@ class ValueType(_message.Message):
|
|
206
172
|
LONG_FIELD_NUMBER: _ClassVar[int]
|
207
173
|
FLOAT_FIELD_NUMBER: _ClassVar[int]
|
208
174
|
DOUBLE_FIELD_NUMBER: _ClassVar[int]
|
209
|
-
NAIVE_TIME_FIELD_NUMBER: _ClassVar[int]
|
210
175
|
NAIVE_DATE_FIELD_NUMBER: _ClassVar[int]
|
211
176
|
NAIVE_DATETIME_FIELD_NUMBER: _ClassVar[int]
|
212
177
|
UTC_DATETIME_FIELD_NUMBER: _ClassVar[int]
|
@@ -222,7 +187,6 @@ class ValueType(_message.Message):
|
|
222
187
|
long: int
|
223
188
|
float: float
|
224
189
|
double: float
|
225
|
-
naive_time: _timestamp_pb2.Timestamp
|
226
190
|
naive_date: _timestamp_pb2.Timestamp
|
227
191
|
naive_datetime: _timestamp_pb2.Timestamp
|
228
192
|
utc_datetime: _timestamp_pb2.Timestamp
|
@@ -231,10 +195,10 @@ class ValueType(_message.Message):
|
|
231
195
|
string: str
|
232
196
|
json: str
|
233
197
|
xml: str
|
234
|
-
def __init__(self, null: bool = ..., bool: bool = ..., short: _Optional[int] = ..., int: _Optional[int] = ..., long: _Optional[int] = ..., float: _Optional[float] = ..., double: _Optional[float] = ...,
|
198
|
+
def __init__(self, null: bool = ..., bool: bool = ..., short: _Optional[int] = ..., int: _Optional[int] = ..., long: _Optional[int] = ..., float: _Optional[float] = ..., double: _Optional[float] = ..., naive_date: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., naive_datetime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., utc_datetime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., decimal: _Optional[str] = ..., binary: _Optional[bytes] = ..., string: _Optional[str] = ..., json: _Optional[str] = ..., xml: _Optional[str] = ...) -> None: ...
|
235
199
|
|
236
200
|
class Table(_message.Message):
|
237
|
-
__slots__ =
|
201
|
+
__slots__ = ("name", "columns")
|
238
202
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
239
203
|
COLUMNS_FIELD_NUMBER: _ClassVar[int]
|
240
204
|
name: str
|
@@ -242,7 +206,7 @@ class Table(_message.Message):
|
|
242
206
|
def __init__(self, name: _Optional[str] = ..., columns: _Optional[_Iterable[_Union[Column, _Mapping]]] = ...) -> None: ...
|
243
207
|
|
244
208
|
class Column(_message.Message):
|
245
|
-
__slots__ =
|
209
|
+
__slots__ = ("name", "type", "primary_key", "decimal")
|
246
210
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
247
211
|
TYPE_FIELD_NUMBER: _ClassVar[int]
|
248
212
|
PRIMARY_KEY_FIELD_NUMBER: _ClassVar[int]
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# source: connector_sdk.proto
|
4
|
+
# Protobuf Python Version: 4.25.0
|
4
5
|
"""Generated protocol buffer code."""
|
5
6
|
from google.protobuf import descriptor as _descriptor
|
6
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
@@ -15,54 +16,60 @@ _sym_db = _symbol_database.Default()
|
|
15
16
|
from fivetran_connector_sdk import common_pb2 as common__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x63onnector_sdk.proto\x12\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x63onnector_sdk.proto\x12\x0c\x66ivetran_sdk\x1a\x0c\x63ommon.proto\"\x8c\x01\n\rSchemaRequest\x12\x45\n\rconfiguration\x18\x01 \x03(\x0b\x32..fivetran_sdk.SchemaRequest.ConfigurationEntry\x1a\x34\n\x12\x43onfigurationEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xeb\x01\n\x0eSchemaResponse\x12\'\n\x1dschema_response_not_supported\x18\x01 \x01(\x08H\x00\x12/\n\x0bwith_schema\x18\x02 \x01(\x0b\x32\x18.fivetran_sdk.SchemaListH\x00\x12\x31\n\x0ewithout_schema\x18\x03 \x01(\x0b\x32\x17.fivetran_sdk.TableListH\x00\x12$\n\x17selection_not_supported\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\n\n\x08responseB\x1a\n\x18_selection_not_supported\"\xf3\x01\n\rUpdateRequest\x12\x45\n\rconfiguration\x18\x01 \x03(\x0b\x32..fivetran_sdk.UpdateRequest.ConfigurationEntry\x12/\n\tselection\x18\x02 \x01(\x0b\x32\x17.fivetran_sdk.SelectionH\x00\x88\x01\x01\x12\x17\n\nstate_json\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x34\n\x12\x43onfigurationEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0c\n\n_selectionB\r\n\x0b_state_json\"\x8b\x01\n\tSelection\x12:\n\x0ewithout_schema\x18\x01 \x01(\x0b\x32 .fivetran_sdk.TablesWithNoSchemaH\x00\x12\x35\n\x0bwith_schema\x18\x02 \x01(\x0b\x32\x1e.fivetran_sdk.TablesWithSchemaH\x00\x42\x0b\n\tselection\"^\n\x12TablesWithNoSchema\x12,\n\x06tables\x18\x01 \x03(\x0b\x32\x1c.fivetran_sdk.TableSelection\x12\x1a\n\x12include_new_tables\x18\x02 \x01(\x08\"_\n\x10TablesWithSchema\x12.\n\x07schemas\x18\x01 \x03(\x0b\x32\x1d.fivetran_sdk.SchemaSelection\x12\x1b\n\x13include_new_schemas\x18\x02 \x01(\x08\"\x82\x01\n\x0fSchemaSelection\x12\x10\n\x08included\x18\x01 \x01(\x08\x12\x13\n\x0bschema_name\x18\x02 \x01(\t\x12,\n\x06tables\x18\x03 \x03(\x0b\x32\x1c.fivetran_sdk.TableSelection\x12\x1a\n\x12include_new_tables\x18\x04 \x01(\x08\"\xbf\x01\n\x0eTableSelection\x12\x10\n\x08included\x18\x01 \x01(\x08\x12\x12\n\ntable_name\x18\x02 \x01(\t\x12:\n\x07\x63olumns\x18\x03 \x03(\x0b\x32).fivetran_sdk.TableSelection.ColumnsEntry\x12\x1b\n\x13include_new_columns\x18\x04 \x01(\x08\x1a.\n\x0c\x43olumnsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"w\n\x0eUpdateResponse\x12+\n\tlog_entry\x18\x01 \x01(\x0b\x32\x16.fivetran_sdk.LogEntryH\x00\x12,\n\toperation\x18\x02 \x01(\x0b\x32\x17.fivetran_sdk.OperationH\x00\x42\n\n\x08response\"B\n\x08LogEntry\x12%\n\x05level\x18\x01 \x01(\x0e\x32\x16.fivetran_sdk.LogLevel\x12\x0f\n\x07message\x18\x02 \x01(\t\"\x9e\x01\n\tOperation\x12&\n\x06record\x18\x01 \x01(\x0b\x32\x14.fivetran_sdk.RecordH\x00\x12\x33\n\rschema_change\x18\x02 \x01(\x0b\x32\x1a.fivetran_sdk.SchemaChangeH\x00\x12.\n\ncheckpoint\x18\x03 \x01(\x0b\x32\x18.fivetran_sdk.CheckpointH\x00\x42\x04\n\x02op\"|\n\x0cSchemaChange\x12/\n\x0bwith_schema\x18\x01 \x01(\x0b\x32\x18.fivetran_sdk.SchemaListH\x00\x12\x31\n\x0ewithout_schema\x18\x02 \x01(\x0b\x32\x17.fivetran_sdk.TableListH\x00\x42\x08\n\x06\x63hange\"\xde\x01\n\x06Record\x12\x18\n\x0bschema_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntable_name\x18\x02 \x01(\t\x12\"\n\x04type\x18\x03 \x01(\x0e\x32\x14.fivetran_sdk.OpType\x12,\n\x04\x64\x61ta\x18\x04 \x03(\x0b\x32\x1e.fivetran_sdk.Record.DataEntry\x1a\x44\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.fivetran_sdk.ValueType:\x02\x38\x01\x42\x0e\n\x0c_schema_name\" \n\nCheckpoint\x12\x12\n\nstate_json\x18\x01 \x01(\t*-\n\x08LogLevel\x12\x08\n\x04INFO\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\n\n\x06SEVERE\x10\x02\x32\xc4\x02\n\tConnector\x12\x66\n\x11\x43onfigurationForm\x12&.fivetran_sdk.ConfigurationFormRequest\x1a\'.fivetran_sdk.ConfigurationFormResponse\"\x00\x12?\n\x04Test\x12\x19.fivetran_sdk.TestRequest\x1a\x1a.fivetran_sdk.TestResponse\"\x00\x12\x45\n\x06Schema\x12\x1b.fivetran_sdk.SchemaRequest\x1a\x1c.fivetran_sdk.SchemaResponse\"\x00\x12G\n\x06Update\x12\x1b.fivetran_sdk.UpdateRequest\x1a\x1c.fivetran_sdk.UpdateResponse\"\x00\x30\x01\x42\x1fH\x01P\x01Z\x19\x66ivetran.com/fivetran_sdkb\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
22
23
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'connector_sdk_pb2', _globals)
|
23
24
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
24
|
-
DESCRIPTOR._options = None
|
25
|
-
DESCRIPTOR._serialized_options = b'H\001P\001Z\031fivetran.com/fivetran_sdk'
|
26
|
-
_SCHEMAREQUEST_CONFIGURATIONENTRY._options = None
|
27
|
-
_SCHEMAREQUEST_CONFIGURATIONENTRY._serialized_options = b'8\001'
|
28
|
-
_UPDATEREQUEST_CONFIGURATIONENTRY._options = None
|
29
|
-
_UPDATEREQUEST_CONFIGURATIONENTRY._serialized_options = b'8\001'
|
30
|
-
_TABLESELECTION_COLUMNSENTRY._options = None
|
31
|
-
_TABLESELECTION_COLUMNSENTRY._serialized_options = b'8\001'
|
32
|
-
_RECORD_DATAENTRY._options = None
|
33
|
-
_RECORD_DATAENTRY._serialized_options = b'8\001'
|
34
|
-
_globals['
|
35
|
-
_globals['
|
36
|
-
_globals['
|
37
|
-
_globals['
|
38
|
-
_globals['
|
39
|
-
_globals['
|
40
|
-
_globals['
|
41
|
-
_globals['
|
42
|
-
_globals['
|
43
|
-
_globals['
|
44
|
-
_globals['
|
45
|
-
_globals['
|
46
|
-
_globals['
|
47
|
-
_globals['
|
48
|
-
_globals['
|
49
|
-
_globals['
|
50
|
-
_globals['
|
51
|
-
_globals['
|
52
|
-
_globals['
|
53
|
-
_globals['
|
54
|
-
_globals['
|
55
|
-
_globals['
|
56
|
-
_globals['
|
57
|
-
_globals['
|
58
|
-
_globals['
|
59
|
-
_globals['
|
60
|
-
_globals['
|
61
|
-
_globals['
|
62
|
-
_globals['
|
63
|
-
_globals['
|
64
|
-
_globals['
|
65
|
-
_globals['
|
66
|
-
_globals['
|
67
|
-
_globals['
|
25
|
+
_globals['DESCRIPTOR']._options = None
|
26
|
+
_globals['DESCRIPTOR']._serialized_options = b'H\001P\001Z\031fivetran.com/fivetran_sdk'
|
27
|
+
_globals['_SCHEMAREQUEST_CONFIGURATIONENTRY']._options = None
|
28
|
+
_globals['_SCHEMAREQUEST_CONFIGURATIONENTRY']._serialized_options = b'8\001'
|
29
|
+
_globals['_UPDATEREQUEST_CONFIGURATIONENTRY']._options = None
|
30
|
+
_globals['_UPDATEREQUEST_CONFIGURATIONENTRY']._serialized_options = b'8\001'
|
31
|
+
_globals['_TABLESELECTION_COLUMNSENTRY']._options = None
|
32
|
+
_globals['_TABLESELECTION_COLUMNSENTRY']._serialized_options = b'8\001'
|
33
|
+
_globals['_RECORD_DATAENTRY']._options = None
|
34
|
+
_globals['_RECORD_DATAENTRY']._serialized_options = b'8\001'
|
35
|
+
_globals['_LOGLEVEL']._serialized_start=2075
|
36
|
+
_globals['_LOGLEVEL']._serialized_end=2120
|
37
|
+
_globals['_SCHEMAREQUEST']._serialized_start=52
|
38
|
+
_globals['_SCHEMAREQUEST']._serialized_end=192
|
39
|
+
_globals['_SCHEMAREQUEST_CONFIGURATIONENTRY']._serialized_start=140
|
40
|
+
_globals['_SCHEMAREQUEST_CONFIGURATIONENTRY']._serialized_end=192
|
41
|
+
_globals['_SCHEMARESPONSE']._serialized_start=195
|
42
|
+
_globals['_SCHEMARESPONSE']._serialized_end=430
|
43
|
+
_globals['_UPDATEREQUEST']._serialized_start=433
|
44
|
+
_globals['_UPDATEREQUEST']._serialized_end=676
|
45
|
+
_globals['_UPDATEREQUEST_CONFIGURATIONENTRY']._serialized_start=140
|
46
|
+
_globals['_UPDATEREQUEST_CONFIGURATIONENTRY']._serialized_end=192
|
47
|
+
_globals['_SELECTION']._serialized_start=679
|
48
|
+
_globals['_SELECTION']._serialized_end=818
|
49
|
+
_globals['_TABLESWITHNOSCHEMA']._serialized_start=820
|
50
|
+
_globals['_TABLESWITHNOSCHEMA']._serialized_end=914
|
51
|
+
_globals['_TABLESWITHSCHEMA']._serialized_start=916
|
52
|
+
_globals['_TABLESWITHSCHEMA']._serialized_end=1011
|
53
|
+
_globals['_SCHEMASELECTION']._serialized_start=1014
|
54
|
+
_globals['_SCHEMASELECTION']._serialized_end=1144
|
55
|
+
_globals['_TABLESELECTION']._serialized_start=1147
|
56
|
+
_globals['_TABLESELECTION']._serialized_end=1338
|
57
|
+
_globals['_TABLESELECTION_COLUMNSENTRY']._serialized_start=1292
|
58
|
+
_globals['_TABLESELECTION_COLUMNSENTRY']._serialized_end=1338
|
59
|
+
_globals['_UPDATERESPONSE']._serialized_start=1340
|
60
|
+
_globals['_UPDATERESPONSE']._serialized_end=1459
|
61
|
+
_globals['_LOGENTRY']._serialized_start=1461
|
62
|
+
_globals['_LOGENTRY']._serialized_end=1527
|
63
|
+
_globals['_OPERATION']._serialized_start=1530
|
64
|
+
_globals['_OPERATION']._serialized_end=1688
|
65
|
+
_globals['_SCHEMACHANGE']._serialized_start=1690
|
66
|
+
_globals['_SCHEMACHANGE']._serialized_end=1814
|
67
|
+
_globals['_RECORD']._serialized_start=1817
|
68
|
+
_globals['_RECORD']._serialized_end=2039
|
69
|
+
_globals['_RECORD_DATAENTRY']._serialized_start=1955
|
70
|
+
_globals['_RECORD_DATAENTRY']._serialized_end=2023
|
71
|
+
_globals['_CHECKPOINT']._serialized_start=2041
|
72
|
+
_globals['_CHECKPOINT']._serialized_end=2073
|
73
|
+
_globals['_CONNECTOR']._serialized_start=2123
|
74
|
+
_globals['_CONNECTOR']._serialized_end=2447
|
68
75
|
# @@protoc_insertion_point(module_scope)
|
@@ -1,15 +1,25 @@
|
|
1
1
|
import common_pb2 as _common_pb2
|
2
2
|
from google.protobuf.internal import containers as _containers
|
3
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
3
4
|
from google.protobuf import descriptor as _descriptor
|
4
5
|
from google.protobuf import message as _message
|
5
6
|
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
6
7
|
|
7
8
|
DESCRIPTOR: _descriptor.FileDescriptor
|
8
9
|
|
10
|
+
class LogLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
11
|
+
__slots__ = ()
|
12
|
+
INFO: _ClassVar[LogLevel]
|
13
|
+
WARNING: _ClassVar[LogLevel]
|
14
|
+
SEVERE: _ClassVar[LogLevel]
|
15
|
+
INFO: LogLevel
|
16
|
+
WARNING: LogLevel
|
17
|
+
SEVERE: LogLevel
|
18
|
+
|
9
19
|
class SchemaRequest(_message.Message):
|
10
|
-
__slots__ =
|
20
|
+
__slots__ = ("configuration",)
|
11
21
|
class ConfigurationEntry(_message.Message):
|
12
|
-
__slots__ =
|
22
|
+
__slots__ = ("key", "value")
|
13
23
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
14
24
|
VALUE_FIELD_NUMBER: _ClassVar[int]
|
15
25
|
key: str
|
@@ -20,7 +30,7 @@ class SchemaRequest(_message.Message):
|
|
20
30
|
def __init__(self, configuration: _Optional[_Mapping[str, str]] = ...) -> None: ...
|
21
31
|
|
22
32
|
class SchemaResponse(_message.Message):
|
23
|
-
__slots__ =
|
33
|
+
__slots__ = ("schema_response_not_supported", "with_schema", "without_schema", "selection_not_supported")
|
24
34
|
SCHEMA_RESPONSE_NOT_SUPPORTED_FIELD_NUMBER: _ClassVar[int]
|
25
35
|
WITH_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
26
36
|
WITHOUT_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
@@ -32,9 +42,9 @@ class SchemaResponse(_message.Message):
|
|
32
42
|
def __init__(self, schema_response_not_supported: bool = ..., with_schema: _Optional[_Union[_common_pb2.SchemaList, _Mapping]] = ..., without_schema: _Optional[_Union[_common_pb2.TableList, _Mapping]] = ..., selection_not_supported: bool = ...) -> None: ...
|
33
43
|
|
34
44
|
class UpdateRequest(_message.Message):
|
35
|
-
__slots__ =
|
45
|
+
__slots__ = ("configuration", "selection", "state_json")
|
36
46
|
class ConfigurationEntry(_message.Message):
|
37
|
-
__slots__ =
|
47
|
+
__slots__ = ("key", "value")
|
38
48
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
39
49
|
VALUE_FIELD_NUMBER: _ClassVar[int]
|
40
50
|
key: str
|
@@ -49,7 +59,7 @@ class UpdateRequest(_message.Message):
|
|
49
59
|
def __init__(self, configuration: _Optional[_Mapping[str, str]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ..., state_json: _Optional[str] = ...) -> None: ...
|
50
60
|
|
51
61
|
class Selection(_message.Message):
|
52
|
-
__slots__ =
|
62
|
+
__slots__ = ("without_schema", "with_schema")
|
53
63
|
WITHOUT_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
54
64
|
WITH_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
55
65
|
without_schema: TablesWithNoSchema
|
@@ -57,7 +67,7 @@ class Selection(_message.Message):
|
|
57
67
|
def __init__(self, without_schema: _Optional[_Union[TablesWithNoSchema, _Mapping]] = ..., with_schema: _Optional[_Union[TablesWithSchema, _Mapping]] = ...) -> None: ...
|
58
68
|
|
59
69
|
class TablesWithNoSchema(_message.Message):
|
60
|
-
__slots__ =
|
70
|
+
__slots__ = ("tables", "include_new_tables")
|
61
71
|
TABLES_FIELD_NUMBER: _ClassVar[int]
|
62
72
|
INCLUDE_NEW_TABLES_FIELD_NUMBER: _ClassVar[int]
|
63
73
|
tables: _containers.RepeatedCompositeFieldContainer[TableSelection]
|
@@ -65,7 +75,7 @@ class TablesWithNoSchema(_message.Message):
|
|
65
75
|
def __init__(self, tables: _Optional[_Iterable[_Union[TableSelection, _Mapping]]] = ..., include_new_tables: bool = ...) -> None: ...
|
66
76
|
|
67
77
|
class TablesWithSchema(_message.Message):
|
68
|
-
__slots__ =
|
78
|
+
__slots__ = ("schemas", "include_new_schemas")
|
69
79
|
SCHEMAS_FIELD_NUMBER: _ClassVar[int]
|
70
80
|
INCLUDE_NEW_SCHEMAS_FIELD_NUMBER: _ClassVar[int]
|
71
81
|
schemas: _containers.RepeatedCompositeFieldContainer[SchemaSelection]
|
@@ -73,7 +83,7 @@ class TablesWithSchema(_message.Message):
|
|
73
83
|
def __init__(self, schemas: _Optional[_Iterable[_Union[SchemaSelection, _Mapping]]] = ..., include_new_schemas: bool = ...) -> None: ...
|
74
84
|
|
75
85
|
class SchemaSelection(_message.Message):
|
76
|
-
__slots__ =
|
86
|
+
__slots__ = ("included", "schema_name", "tables", "include_new_tables")
|
77
87
|
INCLUDED_FIELD_NUMBER: _ClassVar[int]
|
78
88
|
SCHEMA_NAME_FIELD_NUMBER: _ClassVar[int]
|
79
89
|
TABLES_FIELD_NUMBER: _ClassVar[int]
|
@@ -85,9 +95,9 @@ class SchemaSelection(_message.Message):
|
|
85
95
|
def __init__(self, included: bool = ..., schema_name: _Optional[str] = ..., tables: _Optional[_Iterable[_Union[TableSelection, _Mapping]]] = ..., include_new_tables: bool = ...) -> None: ...
|
86
96
|
|
87
97
|
class TableSelection(_message.Message):
|
88
|
-
__slots__ =
|
98
|
+
__slots__ = ("included", "table_name", "columns", "include_new_columns")
|
89
99
|
class ColumnsEntry(_message.Message):
|
90
|
-
__slots__ =
|
100
|
+
__slots__ = ("key", "value")
|
91
101
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
92
102
|
VALUE_FIELD_NUMBER: _ClassVar[int]
|
93
103
|
key: str
|
@@ -104,7 +114,23 @@ class TableSelection(_message.Message):
|
|
104
114
|
def __init__(self, included: bool = ..., table_name: _Optional[str] = ..., columns: _Optional[_Mapping[str, bool]] = ..., include_new_columns: bool = ...) -> None: ...
|
105
115
|
|
106
116
|
class UpdateResponse(_message.Message):
|
107
|
-
__slots__ =
|
117
|
+
__slots__ = ("log_entry", "operation")
|
118
|
+
LOG_ENTRY_FIELD_NUMBER: _ClassVar[int]
|
119
|
+
OPERATION_FIELD_NUMBER: _ClassVar[int]
|
120
|
+
log_entry: LogEntry
|
121
|
+
operation: Operation
|
122
|
+
def __init__(self, log_entry: _Optional[_Union[LogEntry, _Mapping]] = ..., operation: _Optional[_Union[Operation, _Mapping]] = ...) -> None: ...
|
123
|
+
|
124
|
+
class LogEntry(_message.Message):
|
125
|
+
__slots__ = ("level", "message")
|
126
|
+
LEVEL_FIELD_NUMBER: _ClassVar[int]
|
127
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
128
|
+
level: LogLevel
|
129
|
+
message: str
|
130
|
+
def __init__(self, level: _Optional[_Union[LogLevel, str]] = ..., message: _Optional[str] = ...) -> None: ...
|
131
|
+
|
132
|
+
class Operation(_message.Message):
|
133
|
+
__slots__ = ("record", "schema_change", "checkpoint")
|
108
134
|
RECORD_FIELD_NUMBER: _ClassVar[int]
|
109
135
|
SCHEMA_CHANGE_FIELD_NUMBER: _ClassVar[int]
|
110
136
|
CHECKPOINT_FIELD_NUMBER: _ClassVar[int]
|
@@ -114,7 +140,7 @@ class UpdateResponse(_message.Message):
|
|
114
140
|
def __init__(self, record: _Optional[_Union[Record, _Mapping]] = ..., schema_change: _Optional[_Union[SchemaChange, _Mapping]] = ..., checkpoint: _Optional[_Union[Checkpoint, _Mapping]] = ...) -> None: ...
|
115
141
|
|
116
142
|
class SchemaChange(_message.Message):
|
117
|
-
__slots__ =
|
143
|
+
__slots__ = ("with_schema", "without_schema")
|
118
144
|
WITH_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
119
145
|
WITHOUT_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
120
146
|
with_schema: _common_pb2.SchemaList
|
@@ -122,9 +148,9 @@ class SchemaChange(_message.Message):
|
|
122
148
|
def __init__(self, with_schema: _Optional[_Union[_common_pb2.SchemaList, _Mapping]] = ..., without_schema: _Optional[_Union[_common_pb2.TableList, _Mapping]] = ...) -> None: ...
|
123
149
|
|
124
150
|
class Record(_message.Message):
|
125
|
-
__slots__ =
|
151
|
+
__slots__ = ("schema_name", "table_name", "type", "data")
|
126
152
|
class DataEntry(_message.Message):
|
127
|
-
__slots__ =
|
153
|
+
__slots__ = ("key", "value")
|
128
154
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
129
155
|
VALUE_FIELD_NUMBER: _ClassVar[int]
|
130
156
|
key: str
|
@@ -136,12 +162,12 @@ class Record(_message.Message):
|
|
136
162
|
DATA_FIELD_NUMBER: _ClassVar[int]
|
137
163
|
schema_name: str
|
138
164
|
table_name: str
|
139
|
-
type: _common_pb2.
|
165
|
+
type: _common_pb2.OpType
|
140
166
|
data: _containers.MessageMap[str, _common_pb2.ValueType]
|
141
|
-
def __init__(self, schema_name: _Optional[str] = ..., table_name: _Optional[str] = ..., type: _Optional[_Union[_common_pb2.
|
167
|
+
def __init__(self, schema_name: _Optional[str] = ..., table_name: _Optional[str] = ..., type: _Optional[_Union[_common_pb2.OpType, str]] = ..., data: _Optional[_Mapping[str, _common_pb2.ValueType]] = ...) -> None: ...
|
142
168
|
|
143
169
|
class Checkpoint(_message.Message):
|
144
|
-
__slots__ =
|
170
|
+
__slots__ = ("state_json",)
|
145
171
|
STATE_JSON_FIELD_NUMBER: _ClassVar[int]
|
146
172
|
state_json: str
|
147
173
|
def __init__(self, state_json: _Optional[str] = ...) -> None: ...
|
@@ -7,9 +7,8 @@ import grpc
|
|
7
7
|
from fivetran_connector_sdk import common_pb2 as common__pb2
|
8
8
|
from fivetran_connector_sdk import connector_sdk_pb2 as connector__sdk__pb2
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
"""Fivetran (grpc client) <> SourceConnector (grpc server)
|
10
|
+
class ConnectorStub(object):
|
11
|
+
"""Fivetran (grpc client) <> Connector (grpc server)
|
13
12
|
"""
|
14
13
|
|
15
14
|
def __init__(self, channel):
|
@@ -19,29 +18,29 @@ class SourceConnectorStub(object):
|
|
19
18
|
channel: A grpc.Channel.
|
20
19
|
"""
|
21
20
|
self.ConfigurationForm = channel.unary_unary(
|
22
|
-
'/fivetran_sdk.
|
21
|
+
'/fivetran_sdk.Connector/ConfigurationForm',
|
23
22
|
request_serializer=common__pb2.ConfigurationFormRequest.SerializeToString,
|
24
23
|
response_deserializer=common__pb2.ConfigurationFormResponse.FromString,
|
25
24
|
)
|
26
25
|
self.Test = channel.unary_unary(
|
27
|
-
'/fivetran_sdk.
|
26
|
+
'/fivetran_sdk.Connector/Test',
|
28
27
|
request_serializer=common__pb2.TestRequest.SerializeToString,
|
29
28
|
response_deserializer=common__pb2.TestResponse.FromString,
|
30
29
|
)
|
31
30
|
self.Schema = channel.unary_unary(
|
32
|
-
'/fivetran_sdk.
|
31
|
+
'/fivetran_sdk.Connector/Schema',
|
33
32
|
request_serializer=connector__sdk__pb2.SchemaRequest.SerializeToString,
|
34
33
|
response_deserializer=connector__sdk__pb2.SchemaResponse.FromString,
|
35
34
|
)
|
36
35
|
self.Update = channel.unary_stream(
|
37
|
-
'/fivetran_sdk.
|
36
|
+
'/fivetran_sdk.Connector/Update',
|
38
37
|
request_serializer=connector__sdk__pb2.UpdateRequest.SerializeToString,
|
39
38
|
response_deserializer=connector__sdk__pb2.UpdateResponse.FromString,
|
40
39
|
)
|
41
40
|
|
42
41
|
|
43
|
-
class
|
44
|
-
"""Fivetran (grpc client) <>
|
42
|
+
class ConnectorServicer(object):
|
43
|
+
"""Fivetran (grpc client) <> Connector (grpc server)
|
45
44
|
"""
|
46
45
|
|
47
46
|
def ConfigurationForm(self, request, context):
|
@@ -69,7 +68,7 @@ class SourceConnectorServicer(object):
|
|
69
68
|
raise NotImplementedError('Method not implemented!')
|
70
69
|
|
71
70
|
|
72
|
-
def
|
71
|
+
def add_ConnectorServicer_to_server(servicer, server):
|
73
72
|
rpc_method_handlers = {
|
74
73
|
'ConfigurationForm': grpc.unary_unary_rpc_method_handler(
|
75
74
|
servicer.ConfigurationForm,
|
@@ -93,13 +92,13 @@ def add_SourceConnectorServicer_to_server(servicer, server):
|
|
93
92
|
),
|
94
93
|
}
|
95
94
|
generic_handler = grpc.method_handlers_generic_handler(
|
96
|
-
'fivetran_sdk.
|
95
|
+
'fivetran_sdk.Connector', rpc_method_handlers)
|
97
96
|
server.add_generic_rpc_handlers((generic_handler,))
|
98
97
|
|
99
98
|
|
100
99
|
# This class is part of an EXPERIMENTAL API.
|
101
|
-
class
|
102
|
-
"""Fivetran (grpc client) <>
|
100
|
+
class Connector(object):
|
101
|
+
"""Fivetran (grpc client) <> Connector (grpc server)
|
103
102
|
"""
|
104
103
|
|
105
104
|
@staticmethod
|
@@ -113,7 +112,7 @@ class SourceConnector(object):
|
|
113
112
|
wait_for_ready=None,
|
114
113
|
timeout=None,
|
115
114
|
metadata=None):
|
116
|
-
return grpc.experimental.unary_unary(request, target, '/fivetran_sdk.
|
115
|
+
return grpc.experimental.unary_unary(request, target, '/fivetran_sdk.Connector/ConfigurationForm',
|
117
116
|
common__pb2.ConfigurationFormRequest.SerializeToString,
|
118
117
|
common__pb2.ConfigurationFormResponse.FromString,
|
119
118
|
options, channel_credentials,
|
@@ -130,7 +129,7 @@ class SourceConnector(object):
|
|
130
129
|
wait_for_ready=None,
|
131
130
|
timeout=None,
|
132
131
|
metadata=None):
|
133
|
-
return grpc.experimental.unary_unary(request, target, '/fivetran_sdk.
|
132
|
+
return grpc.experimental.unary_unary(request, target, '/fivetran_sdk.Connector/Test',
|
134
133
|
common__pb2.TestRequest.SerializeToString,
|
135
134
|
common__pb2.TestResponse.FromString,
|
136
135
|
options, channel_credentials,
|
@@ -147,7 +146,7 @@ class SourceConnector(object):
|
|
147
146
|
wait_for_ready=None,
|
148
147
|
timeout=None,
|
149
148
|
metadata=None):
|
150
|
-
return grpc.experimental.unary_unary(request, target, '/fivetran_sdk.
|
149
|
+
return grpc.experimental.unary_unary(request, target, '/fivetran_sdk.Connector/Schema',
|
151
150
|
connector__sdk__pb2.SchemaRequest.SerializeToString,
|
152
151
|
connector__sdk__pb2.SchemaResponse.FromString,
|
153
152
|
options, channel_credentials,
|
@@ -164,7 +163,7 @@ class SourceConnector(object):
|
|
164
163
|
wait_for_ready=None,
|
165
164
|
timeout=None,
|
166
165
|
metadata=None):
|
167
|
-
return grpc.experimental.unary_stream(request, target, '/fivetran_sdk.
|
166
|
+
return grpc.experimental.unary_stream(request, target, '/fivetran_sdk.Connector/Update',
|
168
167
|
connector__sdk__pb2.UpdateRequest.SerializeToString,
|
169
168
|
connector__sdk__pb2.UpdateResponse.FromString,
|
170
169
|
options, channel_credentials,
|
{fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/METADATA
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fivetran_connector_sdk
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.7.11.1
|
4
4
|
Summary: Build custom connectors on Fivetran platform
|
5
5
|
Author-email: Fivetran <developers@fivetran.com>
|
6
|
-
Project-URL: Homepage, https://fivetran.com/docs/connector-sdk
|
6
|
+
Project-URL: Homepage, https://fivetran.com/docs/connectors/connector-sdk
|
7
7
|
Project-URL: Github, https://github.com/fivetran/fivetran_connector_sdk
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -0,0 +1,14 @@
|
|
1
|
+
fivetran_connector_sdk/__init__.py,sha256=_7Qod37ieZGNBHMAhP24NruYYfGslYGvWfB5yEijpgM,32433
|
2
|
+
fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
fivetran_connector_sdk/protos/common_pb2.py,sha256=kUwVcyZHgLigNR-KnHZn7dHrlxaMnUXqzprsRx6T72M,6831
|
4
|
+
fivetran_connector_sdk/protos/common_pb2.pyi,sha256=S0hdIzoXyyOKD5cjiGeDDLYpQ9J3LjAvu4rCj1JvJWE,9038
|
5
|
+
fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
6
|
+
fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=9Ke_Ti1s0vAeXapfXT-EryrT2-TSGQb8mhs4gxTpUMk,7732
|
7
|
+
fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=FWYxRgshEF3QDYAE0TM_mv4N2gGvkxCH_uPpxnMc4oA,8406
|
8
|
+
fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=ZfJLp4DW7uP4pFOZ74s_wQ6tD3eIPi-08UfnLwe4tzo,7163
|
9
|
+
fivetran_connector_sdk-0.7.11.1.dist-info/LICENSE,sha256=Kutp3D0T7HmHuBifKmbw39OZLAL1ckaLRb8u9lyJxE8,1065
|
10
|
+
fivetran_connector_sdk-0.7.11.1.dist-info/METADATA,sha256=EGLYjY4_99VeElrHLDiTNp7qf8Yf-zfYv38gnO5p-fU,651
|
11
|
+
fivetran_connector_sdk-0.7.11.1.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
12
|
+
fivetran_connector_sdk-0.7.11.1.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
|
13
|
+
fivetran_connector_sdk-0.7.11.1.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
|
14
|
+
fivetran_connector_sdk-0.7.11.1.dist-info/RECORD,,
|
@@ -1,14 +0,0 @@
|
|
1
|
-
fivetran_connector_sdk/__init__.py,sha256=ABQpcMDfa5cS4l32jnpaUygznAiybwFJ46Amjaody10,29558
|
2
|
-
fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
fivetran_connector_sdk/protos/common_pb2.py,sha256=L4eHLGQAeoEUotWnEGhGHke_gkxZC46oBbB6oW_pcyA,8028
|
4
|
-
fivetran_connector_sdk/protos/common_pb2.pyi,sha256=R_DpVfydkE5POi_GW94QTWmcIOTZBfC762Omb7hVcKU,10888
|
5
|
-
fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
6
|
-
fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=8tpwfD6mxbe09u3pOZGHdEGXU99WShyKeaK0A3-afOY,7021
|
7
|
-
fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=7mUA0lBLe0fcKcTSo04D_w-UIqfMvgjP44fKkaBQcvI,7437
|
8
|
-
fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=AerM3GHYVHWPJW0AZilOaWuFlLSgtX733PcMC7iFs9Y,7287
|
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,,
|
{fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|
{fivetran_connector_sdk-0.6.6.3.dist-info → fivetran_connector_sdk-0.7.11.1.dist-info}/top_level.txt
RENAMED
File without changes
|