Error Importing with Lightning Tool: missing {schema}-schema-create.sql

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

Original topic: lightning工具导入报错 missing {schema}-schema-create.sql

| username: 胡杨树旁

When using the lightning tool to import data, an error occurs [ERROR] [lightning.go:255] [“load data source failed”] [takeTime=407.783µs] [error=“missing {schema}-schema-create.sql”]


【TiDB Usage Environment】Production/Test Environment/POC
【TiDB Version】
【Problem Encountered】
【Reproduction Path】What operations were performed to cause the problem
【Problem Phenomenon and Impact】
【Attachments】

  • Relevant logs, configuration files, Grafana monitoring (https://metricstool.pingcap.com/)
  • TiUP Cluster Display information
  • TiUP Cluster Edit config information
  • TiDB-Overview monitoring
  • Corresponding module’s Grafana monitoring (if any, such as BR, TiDB-binlog, TiCDC, etc.)
  • Corresponding module logs (including logs from 1 hour before and after the issue)

If the question is related to performance optimization or troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results for upload.

| username: xfworld | Original post link

What is the format of the exported data? Can it be imported using Lightning?

| username: buchuitoudegou | Original post link

There is no schema creation file. If this schema does not exist in your TiDB, Lightning needs this file to help you create it.

Generally, the schemas and tables exported by dumpling include this file. You can manually create this file, or manually create this schema in TiDB.

| username: db_user | Original post link

You can learn about the configuration parameters

| username: 胡杨树旁 | Original post link

Problem solved. The imported file did not contain table creation statements. Manually creating the tables worked. Thank you.

| username: 胡杨树旁 | Original post link

Solved. The imported file did not contain table creation statements, so creating them manually worked.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.