# YAML Template for Datashift Import/Export Configuration # Defaults, overrides etc are keyed by CLASS and the OPERATOR <%= @key -%>: <%= @klass -%>: defaults: <%= "#: " if(@defaults.empty?) %> <% @defaults.each do |k, v| -%> <%= "#{k}: #{v}" %> <% end %> overrides: <% if(@overrides.empty?) %> <%= "#: " if(@overrides.empty?) %> <% end %> <% @overrides.each do |k, v| -%> <% k %>: <% v %> <% end -%> # Expects a tuple (list with 2 entries), the rule and the replacement substitutions: <% if(@substitutions.empty?) %> <%= "#- rule" %> <%= "#- replacement" %> <% end %> <% @substitutions.each do |k, v| -%> <% k %>: - <% v.first %> - <% v.last %> <% end -%> prefixes: <%= "#: " if(@prefixs.empty?) %> <% @prefixs.each do |k, v| -%> <%= k %>: <%= v %> <% end -%> postfixes: <%= " #: " if(@postfixs.empty?) %> <% @postfixs.each do |k, v| -%> <%= k %>: <%= v %> <% end -%> <% unless(@headers.empty?) %> # Mappings between inbound column names and internal names # are only required when datashift cannot guess the mapping itself # It will automatically map headings like : # 'Product properties' or 'Product_Properties', 'product Properties' etc to product_properties # # Heading is optional - Custom/internal operators can be provided called on a per row basis # nodes: <% @headers.each_with_index do |s, i| %> - <%= s %>: # heading: # source: <%= s %> # presentation: <%= s %> # operator # operator_type: (defaults to :method) <% end %> <% end %>