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 source: remove base & tables from spec.json, and use the API to list available bases & tables, using bases as the namespaces for streams #12491

Closed
Tracked by #11757
sherifnada opened this issue Apr 30, 2022 · 9 comments · Fixed by #20846
Assignees

Comments

@sherifnada
Copy link
Contributor

sherifnada commented Apr 30, 2022

Tell us about the problem you're trying to solve

Airtable bases are equivalent to database schemas. We should use them as such.

Describe the solution you’d like

  1. Remove the base & tables parameters from spec.json (we'll need to figure out how to handle backwards compatibility here, this is a tricky one)
  2. Instead, list the bases inside the connector (when running discover) by calling the endpoint https://api.airtable.com/v0/meta/bases (see the docs) and set them as the namespace property of each available table (stream).
  3. Then list all tables in a base , those are the streams and the base is the namespace
  4. Return all this in discovery output
@sherifnada sherifnada changed the title Airtable source: remove base from spec.json, and use the available bases as the namespaces for streams Airtable source: remove base & tables from spec.json, and use the API to list available bases & tables, using bases as the namespaces for streams Apr 30, 2022
@sherifnada sherifnada added the type/bug Something isn't working label Apr 30, 2022
@bazarnov bazarnov changed the title Airtable source: remove base & tables from spec.json, and use the API to list available bases & tables, using bases as the namespaces for streams 🐛 Airtable source: remove base & tables from spec.json, and use the API to list available bases & tables, using bases as the namespaces for streams May 18, 2022
@bazarnov
Copy link
Collaborator

bazarnov commented May 20, 2022

@misteryeo @sherifnada
In order to resolve this, we would need to obtain the Client-Secret in addition to API_KEY, we already have.
More info by the following link: https://airtable.com/shrWl6yu8cI8C5Dh3
Basically, we should provide additional header value X-Airtable-Client-Secret: <client_secret> to call Metadata API.
Read this link: https://airtable.com/api/meta Authorization section.

This brings us to the next:

  • Airtable doesn't support OAuth2.0 flow, the only option is to use the API_KEY obtained by each customer on their own.

If we simplify the process like described in the issue the Customers will have to get the same approvals as we do by the link above. This is very inconvenient in terms of "start-and-go" with Airbyte. As an option we can force the Customers to proceed though the obtaining access to Metadata API before the connector setup as the required step, however I personally find this the long way. WDYT?

@sherifnada
Copy link
Contributor Author

@bazarnov agreed with your reasoning for the short term. Can you leave this issue open? I think we may be able to get an exception from air table and integrate using oauth.

Cc @misteryeo

@patygold
Copy link

patygold commented Oct 6, 2022

Hey! Do we have an estimation on this issue already?

I think this will actually solve one of my issues actually.
Basically:
In the discovery step of this Airtable Source, Airbyte gets the schema from the first record returned by Airtable. The problem is, Airtable doesn't return the field in the GET request if the field is empty, even though this field might have a value in another record. This leads to a lot of fields missing from the schema on Airbyte.
And my guess is that this can be solved, if we do the discovery step using the Metadata API

@misteryeo
Copy link
Contributor

Hi @patygold, yes we understand that the Metadata API would solve this issue but unfortunately, we haven't been able to get access from the Airtable team. If you have someone on the Airtable side you could put us in touch with who could possibly get us access, we'd love to move forward here!

cc: @YowanR

@bazarnov
Copy link
Collaborator

bazarnov commented Oct 6, 2022

Hi @patygold, yes we understand that the Metadata API would solve this issue but unfortunately, we haven't been able to get access from the Airtable team. If you have someone on the Airtable side you could put us in touch with who could possibly get us access, we'd love to move forward here!

cc: @YowanR

All we need is the account that has the access to the Metadata API, to reproduce and implement the new dynamic schemas.

But, this will force existing users to obtain the same level of access to be able to use the connector afterwards.

Or, optionally, we can try to make the change backwards capable

@patygold
Copy link

patygold commented Oct 7, 2022

@misteryeo
I've asked around, and unfortunately, we do not have such a contact, only the general customer support. So, we are in the same situation, it seems.

@misteryeo
Copy link
Contributor

Thanks for trying @patygold - we'll continue to find ways around this!

cc: @YowanR

@YowanR
Copy link
Contributor

YowanR commented Nov 21, 2022

This is exciting! Thanks for sharing, @patygold! We'll have the team look at this once we have the bandwidth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: On Hold
5 participants