class Multiwoven::Integrations::Source::AwsSagemakerModel::Client

def read(sync_config)

def read(sync_config)
  connection_config = sync_config.source.connection_specification
  connection_config = connection_config.with_indifferent_access
  payload = sync_config.model.query
  create_connection(connection_config)
  run_model(connection_config, payload)
rescue StandardError => e
  handle_exception(e, {
                     context: "AWS:SAGEMAKER MODEL:READ:EXCEPTION",
                     type: "error",
                     sync_id: sync_config.sync_id,
                     sync_run_id: sync_config.sync_run_id
                   })
end