One can take the opposite point of view - that in fact you are conflating activities and therefore making things more complicated by doing too many things at once.
With Ecto focus on getting the right data. Once you already have the data, transform it into the right shape. And re-keying a map is only one helper function away.
defmodule Demo do
def rekey(source, mappings) do
mapper =
fn ({from, to}, target) ->
case Map.fetch(source, from) do
{:ok, value} ->
Map.put(target, to, value)
_ ->
target
end
end
List.foldl(mappings, %{}, mapper)
end
end
s = %{id: 1, name: "JOB", junk: 999}
from_to = [id: :job_id, name: :job_name, not_junk: :job_not_junk]
t = Demo.rekey(s,from_to)
IO.inspect(t)