How to import table data from Markdown

The transform below illustrates a ‘quick and dirty’ method to import a table of data from a Markdown format file:

markdown-table.transform (10.1 KB)

So basically:

  • import it as a plain text file
  • Filter out rows without |
  • use Split Col to split on |

For the input data I used the Markdown for this page:

Note that some additional work will be required if there is more than one table in the input.

At some point we may add Markdown as an input type, if there is enough demand.

1 Like

I am working a lot with markdown and this move would be a great relief !!

I will add a vote on the wishlist. Are you importing:

  • just a markdown table
  • a web page containing a table
  • a web page containing multiple tables
1 Like

Actually all scenarios

The main ones are

  • mark-down file with one (or more) md-tables
  • mark-down file with one (or more) md-lists
  • mark-down file with md-header structure to be treated like a header column and body column with content rows

webpages can mostly be markdown converted by existing tools …

…thus EDT being markdown syntax aware would ease life tremendously :slight_smile:

1 Like

Thanks. Importing the header as a table sounds rather specialized. Can’t you read it in as a plain text file and use Slice to take the header part?

the problem with slice , in my limited understanding, is

  • it’s restriction to 1 slice per transform. How nice if one could use it to split a file into chunks at given markers ( e.g. any md-headers starting # just in one go )
  • it’s danger of loosing data, once a marker is not found. Here it would be great to have slice with three exit points: a match and a no-match leave-as-is-option OR the ignore (like now).

May be this is more like a row concat with a regular expression condition instead of just a numeric repetition. Or am I thinking in the wrong direction?

Easy Data Transform only ever outputs 1 dataset per transform. Changing this would be a lot of work. But note that you can output to multiple files from 1 output item (set output to to Multiple files).

Yes, I am going to look at that (see this thread).

Slice already supports regex matching of rows.