Sid Senthilnathan
05/12/2021, 5:59 PMSid Senthilnathan
05/12/2021, 6:01 PMSid Senthilnathan
05/12/2021, 6:03 PMlakectl metastore copy --from-schema test_spark --from-table lakefs_table --to-schema test_spark --to-table branch_lakefs_table --to-branch metastore_test
which does create the new table branch_lakefs_table, but the table location still appears to be pointing to the master branch, not metastore_test branch.Sid Senthilnathan
05/12/2021, 6:04 PMBarak Amar
Barak Amar
Barak Amar
Barak Amar
DESCRIBE FORMATTED branch_lakefs_table;
Sid Senthilnathan
05/12/2021, 7:09 PMBarak Amar
Sid Senthilnathan
05/12/2021, 7:14 PMSid Senthilnathan
05/12/2021, 7:15 PMBarak Amar
lakectl --version
Sid Senthilnathan
05/12/2021, 7:19 PMlakectl version 0.40.3
Barak Amar
Barak Amar
lakectl metastore copy --from-schema test_spark --from-table lakefs_table --to-schema test_spark --to-table branch_lakefs_table_test --to-branch no_such_branch
Barak Amar
DESCRIBE FORMATTED lakefs_table;
Sid Senthilnathan
05/12/2021, 7:47 PMSid Senthilnathan
05/12/2021, 7:48 PMBarak Amar
Barak Amar
lakectl metadata copy
.
The copy
command does copy the information from one table to another, but it also holds a merge functionality.
When the destination table exists the merge operation tries to copy all information from the source table. This is for cases that the metadata was updated (like partitions and columns) and you like to update the destination.
The problem is that when you merge, you can't move the location - which is based on the target branch. This means that when you like to copy
the branch name (and the location) of the new table has meaning and when you merge information it has no effect.
Regarding the issue you experienced. Is it possible you performed a copy and didn't specify the branch name the first time you run the command and when we run it again we expected it to get updated, which explains all the pending request where we specified a missing branch and still the operation completed the update and didn't report an error (without location update)?
I will open an issue that explains the issue and suggest splitting the two operations, for a better user experience.Barak Amar
Sid Senthilnathan
05/13/2021, 2:50 PMSid Senthilnathan
05/13/2021, 2:53 PMBarak Amar
Sid Senthilnathan
05/13/2021, 3:12 PMBarak Amar
Sid Senthilnathan
05/13/2021, 3:17 PMSid Senthilnathan
05/13/2021, 3:19 PMBarak Amar
Barak Amar
Barak Amar
Sid Senthilnathan
05/13/2021, 3:37 PMSid Senthilnathan
05/13/2021, 3:37 PMBarak Amar
Sid Senthilnathan
05/13/2021, 3:46 PMBarak Amar