Column tag glossary export (#20858)

* Column tags/ glossary not importing bug fic

* Column tags/ glossary not importing bug fix

---------

Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
aji-aju 2025-04-16 16:27:17 +05:30 committed by GitHub
parent 21bfa65013
commit c092735fce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.csv.CSVPrinter;
@ -315,7 +316,7 @@ public class DatabaseRepository extends EntityRepository<Database> {
for (Table table : tables) {
// Add the table entity
addEntityToCSV(csvFile, table, TABLE);
tableRepository.setFieldsInternal(table, new Fields(Set.of("columns", "tags")));
// Add all columns as separate rows
tableRepository.exportColumnsRecursively(table, csvFile);
}

View File

@ -30,6 +30,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.csv.CSVPrinter;
@ -210,6 +211,8 @@ public class DatabaseSchemaRepository extends EntityRepository<DatabaseSchema> {
tableRepository.listAllForCSV(
tableRepository.getFields("owners,tags,domain,extension"),
schema.getFullyQualifiedName());
tables.forEach(
table -> tableRepository.setFieldsInternal(table, new Fields(Set.of("columns", "tags"))));
tables.sort(Comparator.comparing(EntityInterface::getFullyQualifiedName));
// Get stored procedures under this schema