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

support path parameterization for file data #113

Merged
merged 6 commits into from
Feb 6, 2023

Conversation

Codelone
Copy link
Contributor

Sometimes, we need to use a variable path to execute commands, so replace the file path of PARQUET、ORC、 JSON、CSV by adding arguments。
if need use ,need to set " -f -p param1=/home/xxx.csv,param2=/home/xxx.csv "
then tag/edge path in application.conf needs to be set to param1, param2.
if don't need it , don't use " -f -p ".

@wey-gu wey-gu requested a review from Nicole00 November 21, 2022 07:35
@wey-gu
Copy link
Contributor

wey-gu commented Nov 21, 2022

Great improvement~~
Maybe we need some docs/examples as well :)

@Codelone
Copy link
Contributor Author

In practical using, we will create a scheduler task, the csv file path is fixed, but our file name maybe changing, such as a date suffix, so we need to use a variable path.

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2022

Codecov Report

Base: 55.28% // Head: 55.85% // Increases project coverage by +0.56% 🎉

Coverage data is based on head (afbb1f4) compared to base (ddce430).
Patch coverage: 90.62% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #113      +/-   ##
============================================
+ Coverage     55.28%   55.85%   +0.56%     
  Complexity       81       81              
============================================
  Files            18       18              
  Lines          1438     1461      +23     
  Branches        271      277       +6     
============================================
+ Hits            795      816      +21     
- Misses          501      502       +1     
- Partials        142      143       +1     
Impacted Files Coverage Δ
...ain/scala/com/vesoft/exchange/common/Package.scala 41.66% <ø> (ø)
...la/com/vesoft/exchange/common/config/Configs.scala 62.68% <90.62%> (+1.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

reload: String = "")
reload: String = "",
file: Boolean = false,
path: String = "")
Copy link
Contributor

Choose a reason for hiding this comment

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

it's a great work, thanks!
maybe we should use more understandable variable name,how about change file to variablepath to param?

@Nicole00
Copy link
Contributor

this pr look good to me, and the code needs to be formatted please. @Codelone

@Codelone
Copy link
Contributor Author

It has been changed,please check it。

@Nicole00
Copy link
Contributor

I just noticed there's no test for the variable path for config file, could you please add some test to make sure it works?

@Codelone
Copy link
Contributor Author

test case method configsWithVariableSuite

Copy link
Contributor

@Nicole00 Nicole00 left a comment

Choose a reason for hiding this comment

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

Great job!

@Nicole00 Nicole00 merged commit 2d712d9 into vesoft-inc:master Feb 6, 2023
@Nicole00 Nicole00 changed the title add arguments file is boolean,path is srting support path parameterization for file data Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants