ww-tech / lookml-tools

Tools to handle best practices for LookML dev. Contains three tools: LookML updater, linter, and grapher
Apache License 2.0
85 stars 16 forks source link

Invalid glob for grapher #4

Closed lsabreu96 closed 4 years ago

lsabreu96 commented 5 years ago

Hi, there

I recently tried running grapher in my machine by using python run_grapher.py --config config/grapher/config_grapher.json

I did a first try with the example repo itself. For that matter, I thought I should change the parameter infile_globs in config/grapher/config_grapher.json to https://github.com/ww-tech/lookml-tools/tree/master/examples/grapher/myrepo, but I received the following error:

lucasabreu:~/Downloads/lookml-tools$ python3 run_grapher.py --config config/grapher/config_grapher.json Traceback (most recent call last): File "run_grapher.py", line 42, in <module> main() File "run_grapher.py", line 39, in main LookMlGrapher(config).run() File "/home/lucasabreu/Downloads/lookml-tools/lkmltools/grapher/lookml_grapher.py", line 222, in run self.extract_graph_info(globstrings) File "/home/lucasabreu/Downloads/lookml-tools/lkmltools/grapher/lookml_grapher.py", line 205, in extract_graph_info raise Exception("Invalid glob %s" % globstring) Exception: Invalid glob https://github.com/ww-tech/lookml-tools/tree/master/examples/grapher/myrepo/*.*.lkml

Should I downloaded my lkml files for the scanning or am I just changing the file in the wrong way?

weightwatchers-carlanderson commented 4 years ago

@lsabreu96 I'm sorry for the very slow response. I never got a notification that an issue was filed. (I will have to fix that.) The files should be local. It currently does not support remote files.

When the example config shows:

"infile_globs": [
        "../somerepo/*.lkml"
    ],

it means that there was some parent folder called somerepo containing the files. You can see some of the flow in https://github.com/ww-tech/lookml-tools/blob/master/full_auto_updater.sh where it runs git clone so that the files are local