Class: Chronicle::Shell::ShellHistoryTransformer

Inherits:
ETL::Transformer
  • Object
show all
Defined in:
lib/chronicle/shell/shell_history_transformer.rb

Instance Method Summary collapse

Instance Method Details

#transform(record) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/chronicle/shell/shell_history_transformer.rb', line 16

def transform(record)
  username = record.extraction.meta[:username]
  hostname = record.extraction.meta[:hostname]
  shell_name = record.extraction.meta[:shell_name]
  timestamp = record.data[:timestamp]
  command = record.data[:command]

  build_command(username:, hostname:, command:, shell_name:,
    timestamp:)
end