Exporting post metadata into CSV?

AI-generated summary

rcgillis asks how to export specific metadata (such as category, URL, title, and author) from posts in a particular forum category into a CSV file, excluding the actual post content. The user mentions struggling to achieve this using the Data Explorer plugin and inquires if another utility or plugin would be more suitable. Adam_Root responds that Data Explorer is actually the best tool for this task and no additional plugins are needed. He advises creating a custom SQL query to select only the required fields and filter the results by category ID. The query results can then be downloaded directly as a CSV. Adam_Root also notes that the SQL structure will vary slightly depending on whether the user wants to export data for individual posts or just topic-level details, and asks for clarification on this distinction.

Hi there,

I’m looking to export the metadata of some of my posts within my Discourse forum.

For, example, within one particular category on my forum, I want to export just some of the metadata for the posts: e.g. category, URL, title, author, etc. and not the contents of the posts themselves.

I tried using the data explorer, but couldn’t really get there - curious if there’s another plugin or external utility that might do this job.

Thanks in advance for any insight anyone could provide.

I think Data Explorer would actually be the best option for this. You shouldn’t need another plugin.

You can create a custom SQL query that pulls only the fields you need, such as category, topic title, URL and author, without including the post content.

You can also filter the results by category ID, so you’re only exporting data from that particular category.

Once the query is working, you can download the results as a CSV file.

Are you looking to export details for each individual post or just the topics within that category? The SQL query would be slightly different depending on that.