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

Keep/Drop wildcard #515

Open
NicoLaval opened this issue Oct 5, 2024 · 1 comment
Open

Keep/Drop wildcard #515

NicoLaval opened this issue Oct 5, 2024 · 1 comment

Comments

@NicoLaval
Copy link
Collaborator

Hi,

Currently, keep & drop only accept componentID.

For Dataset having a large number of columns, when you transpose a dataset building 0/1 filled columns, named var_1, ..., var_N and others columns, it would be nice to be able to define:

ds := ds[keep "var_*", other_var_name, "*_other_pattern"]
//or
ds := ds[drop "var_*"]

What do you think?

@NicoLaval NicoLaval mentioned this issue Oct 7, 2024
7 tasks
@vpinna80
Copy link
Collaborator

vpinna80 commented Oct 8, 2024

In order to avoid string interpretation, i would use regexps, though I'm fine with the proposal in general.

Perhaps regexps could be introduced as a new lexer mode, with the slash: https://github.com/antlr/antlr4/blob/master/doc/lexer-rules.md#lexical-modes

There are lexers for regexp that could be adopted without much effort, this is one:
https://github.com/antlr/grammars-v4/blob/c82c128d980f4ce46fb3536f87b06b45b9619922/xsd-regex/regexLexer.g4

Regexp literals could also be added as a new VTL type (scalar or string subset) and used in VTL string functions (instr, replace, match_characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants