This commit is contained in:
Shreyas Goenka 2024-10-21 22:17:19 +02:00
parent df7d5ca2d8
commit dda138fa63
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 6 additions and 2 deletions

View File

@ -47,7 +47,12 @@ func (w *workspaceFilesExtensionsClient) getNotebookStatByNameWithExt(ctx contex
nameWithoutExt := strings.TrimSuffix(name, string(ext))
// File name does not have an extension associated with Databricks notebooks, return early.
if _, ok := notebook.ExtensionToLanguage[ext]; !ok {
if !slices.Contains([]notebook.Extension{
notebook.ExtensionPython,
notebook.ExtensionR,
notebook.ExtensionScala,
notebook.ExtensionSql,
notebook.ExtensionJupyter}, ext) {
return nil, nil
}

View File

@ -20,7 +20,6 @@ var ExtensionToLanguage = map[Extension]workspace.Language{
ExtensionSql: workspace.LanguageSql,
// The platform supports all languages (Python, R, Scala, and SQL) for Jupyter notebooks.
ExtensionJupyter: workspace.LanguageUnknown,
}
func GetExtensionByLanguage(objectInfo *workspace.ObjectInfo) Extension {