databendlabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.89k stars 753 forks source link

Feature: databend with pt-archiver tool #5830

Open enmotplinux opened 2 years ago

enmotplinux commented 2 years ago

Summary

Description for this feature.

在数据归档场景,大部分还使用pt-archiver 工具, 目前 mysql 使用 pt-archiver 工具 导入到databend 中,还存在。兼容性的问题。 image

sundy-li commented 2 years ago

Need to modify pt-archiver script

   foreach my $col ( @cols ) {
      my $def = $def_for{$col};

      $def =~ s/``//g;

      my ( $type ) = $def =~ m/`[^`]+`\s([a-z]+)/;
      die "Can't determine column type for $def" unless $type;
      $type_for{$col} = $type;