I want to Data Export all the posts for analysis

Is there a way to export all the community post data?

I want to run an in-deep analysis of the community activities metric.

  1. Time to first response
  2. Repost to resolution
  3. Time to resolution
  4. Re-Assign to resolution
1 Like

I’d recommend the data explorer plugin. It can do at least some of the analysis that you want and can export whatever data you need.

2 Likes

Thanks!

This is cool!

1 Like

Does anyone have this query to share? Also is there a way to do an export of the raw text of each post published?

Thanks!

Have you looked at the sample queries?

select id post_id,raw from posts

1 Like

That will also give the PMs and deleted posts, which he probably doesn’t want.

@401Ott, if you want all posts published that do not include private messages, then you will need to filter out posts whose topic’s archetype is ‘private_message’.

Additionally, if you don’t want posts that have been deleted you will need to filter out posts where the deleted_at isn’t NULL. But as some posts can be deleted by their topic being deleted, you will also have to filter out posts where the topic they belong to has a deleted_at timestamp.

If you need the exact query, please specify exactly what you need and I will write it for you.

1 Like

Yeah, I think this is spot on that filtering to only the public, published posts is ideal. In a perfect export I would be looking for username, create date (of post), create time, and text body of the post. Having associated tags would also be great.

Overall my goal is to be able to identify when, and how often, a specific URL path is shared on my community. I’m hoping having all the post text in a .csv would help.

Thanks so much for the assistance, @JusticeUK . Let me know if this goal isn’t realistic (and no worries if it is not :grinning_face_with_smiling_eyes: )

The easiest and quickest way to do this is
select post_id, user_id, created_at, raw, cooked from badge_posts where deleted_at is null

with from badge_posts instead of from posts. It’s already filtered to public posts only.

2 Likes

This is where the lack of documentation is quite frustrating, as I wasn’t aware of badge_posts, and so the queries I wrote a few weeks ago all filter out PMs explicitly from posts.