I want to Data Export all the posts for analysis

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.