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

add working directory to handle the data in different directories #184

Merged
merged 5 commits into from
May 31, 2022

Conversation

knwng
Copy link
Contributor

@knwng knwng commented Dec 21, 2021

Hi everyone, I'm adding this feature to deal with the situation when I want to load the data in different directories with the same structures to the same graph. Without this feature, I have to either change each directory's name to the name I use in the config file, or change the config file every time.

Usage: just add workingDir param to the config file(see the last line). It can be an absolute or relative address, and will be inserted to the address of each files[].path and files[].failDatapath.

version: v2
description: example
removeTempFiles: false
clientSettings:
  retry: 3
  concurrency: 10
  channelBufferSize: 128
  space: relation_graph
  connection:
    user: root
    password: nebula
    address: 192.168.31.147:9669
  postStart:
    commands: |
      DROP SPACE IF EXISTS relation_graph;
      CREATE SPACE IF NOT EXISTS relation_graph(partition_num=1, replica_factor=1, vid_type=INT64);
      USE relation_graph;
      CREATE TAG IF NOT EXISTS identity(data string, collect_time datetime);
      CREATE TAG IF NOT EXISTS email(data string, collect_time datetime);
      CREATE TAG IF NOT EXISTS telephone(data string, collect_time datetime);
      CREATE TAG IF NOT EXISTS province(data string, collect_time datetime);
      CREATE EDGE IF NOT EXISTS identity_email(collect_time datetime);
      CREATE EDGE IF NOT EXISTS identity_telephone(collect_time datetime);
      CREATE EDGE IF NOT EXISTS identity_province(collect_time datetime);
    afterPeriod: 8s
logPath: ./err/test.log
workingDir: ./data/

@knwng knwng requested a review from yixinglu as a code owner December 21, 2021 16:23
Copy link
Contributor

@yixinglu yixinglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature. Could you describe how to use this field in README.md and add some tests in example directory ?

@knwng
Copy link
Contributor Author

knwng commented Dec 22, 2021

Nice feature. Could you describe how to use this field in README.md and add some tests in example directory ?

Sure, I'll finish it soon.

@knwng
Copy link
Contributor Author

knwng commented Jan 2, 2022

Hi @yixinglu, I've updated the README files and provided a testing case in examples/v2/example_with_working_dir.yaml, but I couldn't find a proper version of nebula's docker image to test it, as I've mentioned in https://discuss.nebula-graph.com.cn/t/topic/7029. Which version should I use to test the code? Thank you!

@Aiee
Copy link
Contributor

Aiee commented Jan 11, 2022

Hi @yixinglu, I've updated the README files and provided a testing case in examples/v2/example_with_working_dir.yaml, but I couldn't find a proper version of nebula's docker image to test it, as I've mentioned in https://discuss.nebula-graph.com.cn/t/topic/7029. Which version should I use to test the code? Thank you!

Hello @knwng,
Sorry for coming back to you late. Currently, the master branch of nebula-importer is capable of the nightly service, as you can see in the Github action we use the nightly nebula service image to test the importer.

@yixinglu yixinglu merged commit d34f098 into vesoft-inc:master May 31, 2022
@Aiee Aiee added the doc affected PR: improvements or additions to documentation label May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc affected PR: improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants