class_docstr: Command for importing databases, datasets, charts, dashboards and saved queries.
  
  This command is used for managing Superset assets externally under source control,
  and will overwrite everything.
class_docstr_tok: ["Command","for","importing","databases",",","datasets",",","charts",",","dashboards","and","saved","queries",".","This","command","is","used","for","managing","Superset","assets","externally","under","source","control",",","and","will","overwrite","everything","."]
code: def run(self) -> None:
      self.validate()
  
      # rollback to prevent partial imports
      try:
          self._import(db.session, self._configs)
          db.session.commit()
      except Exception as ex:
          db.session.rollback()
          raise ImportFailedError() from ex
  
imports: from typing import Any, Optional
  from marshmallow import Schema
  from marshmallow.exceptions import ValidationError
  from sqlalchemy.orm import Session
  from sqlalchemy.sql import delete, insert
  from superset import db
  from superset.charts.schemas import ImportV1ChartSchema
  from superset.commands.base import BaseCommand
  from superset.commands.chart.importers.v1.utils import import_chart
  from superset.commands.dashboard.importers.v1.utils import find_chart_uuids, import_dashboard, update_id_refs
  from superset.commands.database.importers.v1.utils import import_database
  from superset.commands.dataset.importers.v1.utils import import_dataset
  from superset.commands.exceptions import CommandInvalidError, ImportFailedError
  from superset.commands.importers.v1.utils import load_configs, load_metadata, validate_metadata_type
  from superset.commands.query.importers.v1.utils import import_saved_query
  from superset.dashboards.schemas import ImportV1DashboardSchema
  from superset.databases.schemas import ImportV1DatabaseSchema
  from superset.datasets.schemas import ImportV1DatasetSchema
  from superset.models.dashboard import dashboard_slices
  from superset.queries.saved_queries.schemas import ImportV1SavedQuerySchema
label_desc: Use image node_id 3 for calling the ImportAssetsCommand obj's underlying member method code with example usage: obj.run() without return types