Class: Etl::Integrations::Destination::Tally::Client
- Inherits:
-
DestinationConnector
- Object
- DestinationConnector
- Etl::Integrations::Destination::Tally::Client
- Includes:
- Core::RateLimiter
- Defined in:
- lib/etl/integrations/destination/tally/client.rb
Instance Method Summary collapse
- #check_connection(connection_config) ⇒ Object
- #discover(_connection_config = nil) ⇒ Object
- #write(sync_config, records, action = "create") ⇒ Object
Instance Method Details
#check_connection(connection_config) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/etl/integrations/destination/tally/client.rb', line 21 def check_connection(connection_config) connection_config = connection_config.with_indifferent_access initialize_client(connection_config) authenticate_client success_status rescue StandardError => e failure_status(e) end |
#discover(_connection_config = nil) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/etl/integrations/destination/tally/client.rb', line 30 def discover(_connection_config = nil) catalog = build_catalog(load_catalog) catalog. rescue StandardError => e handle_exception("TALLY:DISCOVER:EXCEPTION", "error", e) end |
#write(sync_config, records, action = "create") ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/etl/integrations/destination/tally/client.rb', line 37 def write(sync_config, records, action = "create") @action = sync_config.stream.action || action initialize_client(sync_config.destination.connection_specification) process_records(records, sync_config.stream) rescue StandardError => e handle_exception("TALLY:WRITE:EXCEPTION", "error", e) end |