wohbbg
Last Updated: February 25, 2016
·
119
· bneil
D6f16c83f312a78d42db23285de33601

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

Say Thanks
Respond