Пример #1
0
 def _get_folder_path(self, folder: FolderBase, client: Looker31SDK) -> str:
     assert folder.id is not None
     ancestors = [
         ancestor.name
         for ancestor in client.folder_ancestors(folder.id, fields="name")
     ]
     return "/".join(ancestors + [folder.name])
Пример #2
0
 def _get_folder_path(self, folder: FolderBase, client: Looker31SDK) -> str:
     assert folder.id
     if not self.folder_path_cache.get(folder.id):
         ancestors = [
             ancestor.name
             for ancestor in client.folder_ancestors(folder.id, fields="name")
         ]
         self.folder_path_cache[folder.id] = "/".join(ancestors + [folder.name])
     return self.folder_path_cache[folder.id]
Пример #3
0
 def _get_folder_path(self, folder: FolderBase, client: Looker31SDK) -> str:
     assert folder.id
     if not self.folder_path_cache.get(folder.id):
         ancestors = [
             ancestor.name for ancestor in client.folder_ancestors(
                 folder.id,
                 fields="name",
                 transport_options=self.source_config.transport_options.
                 get_transport_options() if self.source_config.
                 transport_options is not None else None,
             )
         ]
         self.folder_path_cache[folder.id] = "/".join(ancestors +
                                                      [folder.name])
     return self.folder_path_cache[folder.id]