databricks-cli
                                
                                 databricks-cli copied to clipboard
                                
                                    databricks-cli copied to clipboard
                            
                            
                            
                        Add "workspace export_any" command
I propose to add an additional option to workspace so that the user doesn't need to know which type of object exists at the given path. When executing a "workspace ls" it is difficult to tell which type of object it is programmatically (without spoofing a color console and parsing the color codes.) It looks like "workspace export" will fail on a directory and "workspace export_dir" will fail on a non-directory, so neither command is a surefire way to export a given path. I propose to add "export_any" which will call one of the two above functions as appropriate, given the path.
Nevermind. Reading through the code I just found the "-l" option to the "ls" command. I now propose adding doc about this option to the README.rst. I'll make a PR.
Addressed with PR#54.
Actually, I don't think this is going to solve the problem, because the output is written "space" separated, rather than tab-separated, using tabulate library. The issue is that it will be error-prone to try to parse that, since many object-names have spaces in them. I propose to switch to "tab" separated, or add an option to do so.
Unfortunately it's hard to get alignment right with tab delimiters. ls -l will use space delimiters too. Would a new output format called --json work better? That way you can parse the json output directly with something like jq.
Yes, that would be a great option. No urgency on this idea for now.... I'm experimenting with working directly with the REST API.