You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now, only "index" is supported in props definition to map a prop value to a column of csv. Sometimes, this requires a lot of prework to format the csv files.
Describe the solution you'd like
Probably, we can add a "template" to allow more flexible value mapping.
Say, $i refers to the i th column in the csv.
The simplest template is like below, same as "index";
tempalte: left($i, 3) tempalte: $i + $j tempalte: timestamp(datetime($i)) tempalte: case when $i==something then $j else $k end
You can think of more.
Basically, most of the nGQL functions and also "case when" can be supported in the templates.
This will use more GraphD CPU, but the usability gain is a lot.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
@MuYiYong
It feels like the requirements need to be refined:
If there is a template, will other fields take effect? For example: nullable, nullValue, alternativeIndices, defaultValue. If they take effect, what is the order?
How to deal with types in templates? For example, should $i be a string or a number?
What to do if $ is not followed by a number?
What to do if the template itself contains the $ character?
After starting the template, do I still need to perform type conversion? For example, whether left($i, 3) still needs quotation marks, and another example, such as prefix_$0 seems need add quotation marks.
Is your feature request related to a problem? Please describe.
Right now, only "index" is supported in props definition to map a prop value to a column of csv. Sometimes, this requires a lot of prework to format the csv files.
Describe the solution you'd like
Probably, we can add a "template" to allow more flexible value mapping.
Say, $i refers to the i th column in the csv.
The simplest template is like below, same as "index";
But how about below?
tempalte: left($i, 3)
tempalte: $i + $j
tempalte: timestamp(datetime($i))
tempalte: case when $i==something then $j else $k end
You can think of more.
Basically, most of the nGQL functions and also "case when" can be supported in the templates.
This will use more GraphD CPU, but the usability gain is a lot.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: