Lightning Import Error: Schema Not Found

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Lightning导入报错schema not found

| username: Hacker_Dvkc9hRC

[TiDB Usage Environment] Production Environment
[TiDB Version] V6.5.8
[Reproduction Path] Create a sequence in database A, export the sequence using dumpling, and then import it into database B using Lightning, resulting in an error: schema not found
[Encountered Problem: Phenomenon and Impact]
tidb lightning encountered error: [Lightning:Restore:ErrSchemaNotExists] table testdb.SEQ_DSN-schema-sequence schema not found

All imported tables have been successfully imported into database B, but the sequence cannot be imported into the B database environment using Lightning.

Questions:

  1. What tool can be used to export the sequence from TiDB-A cluster and then import it into TiDB-B cluster?
  2. Does the current Lightning tool only support table DDL and DML, and does it support sequence import?
  3. When using the dumpling tool to export the SQL file of the sequence, should the corresponding schema information be added to the export statement, for example:
    CREATE SEQUENCE testdb.SEQ_WHITEUSERID