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 data parameter to _detect_relationships method #2190

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

fealho
Copy link
Member

@fealho fealho commented Aug 19, 2024

@sdv-team
Copy link
Contributor

@fealho fealho marked this pull request as ready for review August 19, 2024 16:16
@fealho fealho requested a review from a team as a code owner August 19, 2024 16:16
Comment on lines 607 to 610
data = {
csv_file.stem: pd.read_csv(str(csv_file), **read_csv_parameters)
for csv_file in csv_files
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should we just add the data to the dict in the for loop above?

for csv_file in csv_files:
table_name = csv_file.stem
self.detect_table_from_csv(table_name, str(csv_file), read_csv_parameters)
data[csv_file.stem] = pd.read_csv(str(csv_file), **read_csv_parameters)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use the _load_from_csv util? Also instead of having to load the CSV twice, would it make more sense to load it and then use detect_from_dataframe instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

@frances-h Sure. Do you know if the detect_table_from_csv method is user facing? Otherwise this implementation removes the only usage of that method, so I would remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@amontanez24 thoughts? It's not in the docs but also doesn't have an _ preceding the function name. Maybe leave it for now and come back to it later?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah it's a private method, but you'd want to make sure it doesn't cause anything else to fail. I'm not sure if we use it anywhere else or in enterprise at all

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not used in SDV, SDV-Enterprise or SDGym.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then it should be fine to remove

@fealho fealho force-pushed the enterprise-issue-734-foreign-key branch from 78efd86 to bbede32 Compare August 21, 2024 21:15
@fealho fealho merged commit 84eeac8 into main Aug 22, 2024
39 checks passed
@fealho fealho deleted the enterprise-issue-734-foreign-key branch August 22, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants