Some workflows need access to the comments at the top of a LookML file (e.g., autogenerated notes or metadata). Currently, lkml.load() discards this preamble.
Proposal:
Add an optional flag (e.g. keep_prefix) so the returned dict can include the raw comment/whitespace preamble:
lkml.load(raw, keep_prefix=True)
# => {"views": [...], "_prefix": "# This file is generated automatically\n..."}
suggested implementation can be found in this PR :)
Some workflows need access to the comments at the top of a LookML file (e.g., autogenerated notes or metadata). Currently,
lkml.load()discards this preamble.Proposal:
Add an optional flag (e.g.
keep_prefix) so the returned dict can include the raw comment/whitespace preamble:suggested implementation can be found in this PR :)