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

feat(function-list): search file by data source name #859

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

grieve54706
Copy link
Contributor

@grieve54706 grieve54706 commented Oct 29, 2024

Follow up #858
Change the function file path to a folder path and search the file by data source name.
The system will find the CSV file by the data source name in the path from the env var

Before

Env var

REMOTE_FUNCTION_LIST_PATH=/resource/functions.csv

Actual path

/resource/functions.csv

API

/v3/connector/functions

After

Env var

REMOTE_FUNCTION_LIST_PATH=/resource

Actual path by data source

/resource/postgres.csv

API

/v3/connector/postgres/functions

@grieve54706 grieve54706 requested a review from goldmedal October 29, 2024 09:31
@github-actions github-actions bot added ibis python Pull requests that update Python code labels Oct 29, 2024
@@ -58,6 +58,13 @@ def update(self, diagnose: bool):
else:
self.init_logger()

def get_remote_function_list_path(self, data_source: str) -> str:
return (
f"{self.remote_function_list_path}/{data_source}/functions.csv"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe change to this pattern? We don't need another folder, I guess.

Suggested change
f"{self.remote_function_list_path}/{data_source}/functions.csv"
f"{self.remote_function_list_path}/{data_source}.csv"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@grieve54706 grieve54706 changed the title feat(function-list): add data source layer feat(function-list): search file by data source name Oct 29, 2024
@grieve54706 grieve54706 requested a review from goldmedal October 29, 2024 09:44
Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @grieve54706 LGTM 👍

@goldmedal goldmedal merged commit 7a83eda into main Oct 29, 2024
13 checks passed
@goldmedal goldmedal deleted the feature/data-source-layer-for-func-list branch October 29, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ibis python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants