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/sql source #185

Merged
merged 6 commits into from
Oct 21, 2024
Merged

feat/sql source #185

merged 6 commits into from
Oct 21, 2024

Conversation

rbiseck3
Copy link
Collaborator

Description

Update both the sqlite and postgres implementations to support a source connector.

"password": "test",
}
with postgres_download_setup():
with tempfile.TemporaryDirectory() as tmpdir:
Copy link
Contributor

Choose a reason for hiding this comment

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

Eventually would love to have this configurable to go to TempDirectory or a specified directory like in the .sh ingest tests. Nice to have.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why would we want that? This is a cleaner version of that, making sure the data is always cleanup up since for the test, we never need the contents that are written here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've found it valuable to see what is being downloaded from source connectors in the past. I like to look at the .json files from the indexer and the .txt files from the downloader to troubleshoot. I can always just change it from tempdir to a named folder when I need to so not a big deal. But I always tell new connector devs to run the tests and then look at the resulting files as an example of what their "new" connector needs to be doing in the many phases.

downloader=downloader,
configs=ValidationConfigs(
test_id="sqlite",
expected_num_files=40,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great. Would love to have another validation called length of list or something like that so that we could indeed check that only car_id and brand came through.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nothing is stopping us from adding an additional test after that one, I can add it in here. This just wraps the most common functionality that is shared by all source connector tests.

Copy link
Contributor

@potter-potter potter-potter left a comment

Choose a reason for hiding this comment

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

looks good. had a few suggestions for future tests.

@rbiseck3 rbiseck3 merged commit 977fc0a into main Oct 21, 2024
26 checks passed
@rbiseck3 rbiseck3 deleted the roman/postgres-source branch October 21, 2024 19:45
jaisir-shadai pushed a commit to shadai-group/shadai-rag-unstructured-ingest that referenced this pull request Nov 10, 2024
* implement sqlite version of sql indexer and downloader

* add integration test for sqlite source connector

* Drop ids from copied filedata

* migrate env setup over to integration test folder

* add postgres source connector with tests

* bump changelog
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.

2 participants