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

Airtable connector #3564

Merged
merged 9 commits into from
Dec 31, 2024
Merged

Airtable connector #3564

merged 9 commits into from
Dec 31, 2024

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Dec 31, 2024

Description

Adds Airtable connector.

How Has This Been Tested?

"Unit" test + manually creating connector + running it locally.

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)

Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 2:43am

icon: AirtableIcon,
displayName: "Airtable",
category: SourceCategory.Other,
docs: "https://docs.onyx.app/connectors/airtable",
Copy link
Contributor

Choose a reason for hiding this comment

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

docs link doesn't exist yet

def _should_be_metadata(self, field_type: str) -> bool:
"""Determine if a field type should be treated as metadata."""
# NOTE: all are made lowercase to avoid case sensitivity issues
metadata_field_types = {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this should be a class var / constant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! I did this for closer proximity between definition and use (e.g. no need to scroll up to check if something is metadata), but I can see both ways being good (e.g. this allows for easier re-use of the metadata types)

)

record_document = Document(
id=str(record_id),
Copy link
Contributor

Choose a reason for hiding this comment

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

odds of a collision here are probably low due to how the id's are formatted, but a prefix on the document id has helped avoid them in other connectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, added!

Copy link
Contributor

@rkuo-danswer rkuo-danswer left a comment

Choose a reason for hiding this comment

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

test needs updating with id changing format, otherwise looks good.

@Weves Weves enabled auto-merge December 31, 2024 02:41
@Weves Weves added this pull request to the merge queue Dec 31, 2024
Merged via the queue into main with commit 3f92ed9 Dec 31, 2024
13 checks passed
@Weves Weves deleted the airtable-connector branch January 2, 2025 03:35
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