Last Updated: February 25, 2016
· bneil

Exporting ets table to a file

Depending on the size of the data you are attempting to export to a file, id suggest one of the following:

1) attach to a running erlang process

2) > Data = ets:tab2list(table_name).

3) > file:write_file("/tmp/table_output", io_lib:fwrite("~p.\n", [Data])).

ive run this before and had the process die due to memory issues, in that case I used tee.

1) erl | tee table_information.txt

2) ets:tab2list(table_name).

then close out of the shell and parse away