Knowledge Base Article

Text Mining With SQL

One of the recent questions I had to answer focused on analyzing text data. How have you solved this problem in the past? I was not sure how to create an optimized solution for both efficiency and completeness. My solution I came up with used a join condition that had the following query structure:
select
  text_data.id
  , text_data.text
  , keywords.keyword
from
  text_data
  join keywords on
    text_data.text like concat('%', keywords.keyword, '%')
This seemed like a brute force method, but it worked.
Published 10-26-2021
No CommentsBe the first to comment