module Table = ImportDataTypes.Table
module Path = ImportDataTypes.Path

let path : conf:ImporterSyntax.t -> Format.formatter -> Path.t -> unit =
 fun ~conf buffer { alias; column } ->
  let table = ImporterSyntax.get_table_for_name conf alias in
  Format.fprintf buffer "%s"
    (Table.print_column table ("col_" ^ string_of_int column))

let prepare_key : f:(Format.formatter -> unit) -> Format.formatter -> unit =
 fun ~f formatter -> Format.fprintf formatter "rtrim(upper(%t))" f