code: def my_import(file):
      
      # , help="The path to the CSV file to import. The first row must contain column names."
      lines = None
      with open(file) as csv_file:
          lines = csv_file.readlines()
  
      # Header, the first line.
      header = lines[0]
      lines.remove(header)
      header = header.rstrip()
  
      # Parse records from a csv row.
      counter = 0
      app = AppAggregate()
      app.open_session()
      for line in lines:
          # Create insert statements
          line = line.rstrip()
          command = f"insert into AssetClass ({header}) values ({line});"
          # insert records
          app.session.execute(command)
          try:
              app.save()
          except:
              print(f"error: ", sys.exc_info()[0])
              app.session.close()
          counter += 1
      print(f"Data imported. {counter} rows created.")
docs: Import Asset Class(es) from a .csv file