Don't format URL in the name
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -105,6 +105,11 @@ func FormatParquetName(path string) string {
|
||||
}
|
||||
}
|
||||
|
||||
formattedSourceName := ""
|
||||
if strings.Contains(sourceName, ".") { // If it's an URL
|
||||
sourceName = strings.ReplaceAll(sourceName, "_", "-")
|
||||
formattedSourceName = sourceName
|
||||
} else { // Else
|
||||
sourceName = strings.ReplaceAll(sourceName, "_", " ")
|
||||
sourceWords := strings.Fields(sourceName)
|
||||
for i, word := range sourceWords {
|
||||
@@ -112,7 +117,8 @@ func FormatParquetName(path string) string {
|
||||
sourceWords[i] = strings.ToUpper(string(word[0])) + word[1:]
|
||||
}
|
||||
}
|
||||
formattedSourceName := strings.Join(sourceWords, " ")
|
||||
formattedSourceName = strings.Join(sourceWords, " ")
|
||||
}
|
||||
|
||||
if len(blocks) > 0 {
|
||||
return fmt.Sprintf("%s (%s)", formattedSourceName, strings.Join(blocks, ", "))
|
||||
|
||||
Reference in New Issue
Block a user