code: def remove_value_if_too_long():
      bind = op.get_bind()
      session = db.Session(bind=bind)
  
      # it will be easier for users to notice that their field has been deleted rather than truncated
      # so just remove it if it won't fit back into the 1000 string length column
      try:
          rows = (
              session.query(SqlaTable)
              .filter(
                  func.length(SqlaTable.fetch_values_predicate) > 1000
              )
              .all()
          )
  
          for row in rows:
              row.fetch_values_predicate = None
  
          logging.info("%d values deleted", len(rows))
  
          session.commit()
          session.close()
      except Exception as ex:
          logging.warning(ex)
  
file_path: superset/superset/migrations/versions/2021-08-09_17-32_07071313dd52_change_fetch_values_predicate_to_text.py
imports: import logging
  import sqlalchemy
  from alembic import op
  from sqlalchemy import func
  from superset import db
  from superset.connectors.sqla.models import SqlaTable
label_desc: Use image node_id 2 for calling a global function with example usage: remove_value_if_too_long() without return types