-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug TiDB Cloud Documentation: Import Local Files to TiDB Cloud #15739
Comments
/assign |
👋 @RakerZh, just a quick reminder to make your TiDB Docs Dash contributions by January 12 at 07:59 UTC. Let us know if you have any questions! |
Test ResultGood. Almost all passed. SuggestionHope there would be more options to import a csv file. For example, when a user imports file, there is only primary key option to click. It will be great if there were key selection from IssueA small issue for split files larger than 50MB, when total number of lines in file is not exactly divisible by #!/bin/bash
n=$1
file_path=$2
file_extension="${file_path##*.}"
file_name="${file_path%.*}"
lines_per_file=$(( $(wc -l < $file_path) / $n ))
split -d -a 1 -l $lines_per_file $file_path $file_name.
for (( i=0; i<$n; i++ ))
do
mv $file_name.$i $file_name.$i.$file_extension
done sh ./split.sh 4 3.csv Result:
There will be a 3.4 file with extra lines but without Fixed: #!/bin/bash
n=$1
file_path=$2
file_extension="${file_path##*.}"
file_name="${file_path%.*}"
total_lines=$(wc -l < $file_path)
lines_per_file=$(( (total_lines + n - 1) / n ))
split -d -a 1 -l $lines_per_file $file_path $file_name.
for (( i=0; i<$n; i++ ))
do
mv $file_name.$i $file_name.$i.$file_extension
done This will round up the division.
|
Hi @RakerZh, Thank you sincerely for your valuable contribution to our Docs Dash compaign. Your dedicated effort has significantly enhanced the quality of TiDB documentation. We deeply appreciate your hard work and commitment! |
This issue is a sub-issue of Debug TiDB Cloud Documentation: Summary Issue · Issue #15480 · pingcap/docs. The purpose of this sub-issue is to verify and debug the Import Local Files to TiDB Cloud document.
You can follow the instructions provided in #15480 to verify and debug the instructions in this document.
Your contribution to testing and verifying the documentation is highly appreciated!
The text was updated successfully, but these errors were encountered: