vesoft-inc/nebula-importer

Support value template in props definition

オープン

#287 opened on 2023/09/06

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)Go (62 件のフォーク)auto 404
HACKTOBERFESTtype/feature req

Repository metrics

Stars
 (101 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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";

  props:
    - name: "propname"
      type: "xxxxx"
      template: $i

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

コントリビューターガイド