Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSL: global variables #1278

Open
archetyped opened this issue Apr 28, 2023 · 0 comments
Open

DSL: global variables #1278

archetyped opened this issue Apr 28, 2023 · 0 comments

Comments

@archetyped
Copy link

When running a command with multiple put statements, it would be very helpful to have global variables accessible via DSL expressions.

While we can load a file accessible to all put commands with the --load flag, any out-of-stream variables defined therein are reset for each put command (i.e. values do not persist across the put commands).

Currently, the only way to persist a value across multiple put commands is to create a new field containing the value for all records. This could conflict with existing fields and may also reduce performance when working with large datasets.

Global variables would allow values to persist across an entire Miller command, accessible wherever Miller's DSL is used (put, filter), without having to modify the fields of the data being evaluated.

@johnkerl johnkerl changed the title DSL: Global Variables DSL: global variables May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants