Can Dumpling export data with specified fields?

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

Original topic: 使用dumpling导出数据可以导出指定字段吗?

| username: jingyesi3401

[TiDB Usage Environment] Production Environment, Testing

[TiDB Version] v5.1.0

[Encountered Problem: Problem Phenomenon and Impact] Currently, we need to export a large table from production without exporting its corresponding ID. Can we use Dumpling to export specified fields?

| username: h5n1 | Original post link

The -S or --sql option exports data based on the specified SQL query. This option does not support concurrent export.

| username: jingyesi3401 | Original post link

Is it similar to the following operation? However, my IDs have gaps, so I need to manually search for them. The created_time does not have a new index, and the table has over 90 billion rows, so it will be very slow.
-S “select produce_id,…,last_modified_time from x where id>=‘’ and id<=‘’”
-S “select produce_id,…,last_modified_time from x where created_time>=‘’ and created_time<=‘’”

| username: Kongdom | Original post link

Is it possible to export everything and then drop the fields after importing? It seems like it would be faster this way.

| username: tidb菜鸟一只 | Original post link

Is the id an auto-increment primary key? Out of over 90 billion records, do you only need to export a small portion that meets the created_time criteria?

| username: jingyesi3401 | Original post link

The create_time index has not been created, so we plan to use a program for export and import operations.

| username: tidb狂热爱好者 | Original post link

mysql -e “select id, id2” > 1.txt

| username: BraveChen | Original post link

I think so too, you little smartie :grin:

| username: BraveChen | Original post link

How about this?

| username: tidb狂热爱好者 | Original post link

Yes, faster.

| username: Kongdom | Original post link

:sunglasses::sunglasses: