docstr: Return keyword of sql statement. Should be one of:
  
  start (transaction)
  set (autocommit, names etc)
  use
  show
  delete
  insert
  update
  alter
  select
  rollback
  commit
  explain
  drop
  retrain
  describe
  begin
  
  create_predictor
  create_table
  create_datasource
  create_database
code: def get_keyword(sql):
      """Return keyword of sql statement. Should be one of:
  
      start (transaction)
      set (autocommit, names etc)
      use
      show
      delete
      insert
      update
      alter
      select
      rollback
      commit
      explain
      drop
      retrain
      describe
      begin
  
      create_predictor
      create_table
      create_datasource
      create_database
      """
      (
          START,
          SET,
          USE,
          SHOW,
          DELETE,
          INSERT,
          UPDATE,
          ALTER,
          SELECT,
          ROLLBACK,
          COMMIT,
          EXPLAIN,
          CREATE,
          AI,
          TABLE,
          PREDICTOR,
          VIEW,
          DATASOURCE,
          DROP,
          RETRAIN,
          DESCRIBE,
          DATABASE,
          BEGIN,
      ) = map(
          CaselessKeyword,
          "START SET USE SHOW DELETE INSERT UPDATE ALTER SELECT ROLLBACK COMMIT EXPLAIN CREATE AI TABLE PREDICTOR VIEW DATASOURCE DROP RETRAIN DESCRIBE DATABASE BEGIN".split(),
      )
      CREATE_PREDICTOR = CREATE + PREDICTOR
      CREATE_VIEW = CREATE + VIEW
      CREATE_DATASOURCE = CREATE + DATASOURCE
      CREATE_DATABASE = CREATE + DATABASE
      CREATE_TABLE = CREATE + TABLE
  
      expr = (
          START
          | SET
          | USE
          | SHOW
          | DELETE
          | INSERT
          | UPDATE
          | ALTER
          | SELECT
          | ROLLBACK
          | COMMIT
          | EXPLAIN
          | CREATE_PREDICTOR
          | CREATE_VIEW
          | DROP
          | RETRAIN
          | CREATE_DATASOURCE
          | DESCRIBE
          | CREATE_DATABASE
          | CREATE_TABLE
          | BEGIN
      )("keyword")
  
      r = expr.parseString(sql)
  
      keyword = "_".join(r.get("keyword", [])).lower()
  
      if keyword == 0:
          raise exc.ErSqlSyntaxError("Cant get keyword from statement")
  
      return keyword
  
file_path: mindsdb/mindsdb/api/mysql/mysql_proxy/classes/sql_statement_parser.py
imports: import re
  from pyparsing import CaselessKeyword, originalTextFor, ParseException, ParserElement, QuotedString, ZeroOrMore, nestedExpr, restOfLine, StringEnd, Literal, SkipTo
  from mindsdb.api.mysql.mysql_proxy.utilities import exceptions
label_desc: Use image node_id 6 for calling the SqlStatementParser obj's underlying member method code with example usage: obj.get_keyword(sql) and returns: keyword