francois2metz / steampipe-plugin-airtable

Steampipe plugin to access Airtable
https://hub.steampipe.io/plugins/francois2metz/airtable/
Apache License 2.0
14 stars 7 forks source link

Feedback and review #1

Closed e-gineer closed 3 years ago

e-gineer commented 3 years ago

Hey @francois2metz ... really great work on this new type of plugin!

I installed it easily and played around. Here are some suggestions:

Airtable tables can get very large, and the API has good support for limits, filters, etc. I recommend:

Harder, but (mostly?) doable:

We may have more later. Happy to discuss any of these or help! :-)

francois2metz commented 3 years ago

Thanks for the review. I'll work on it.

On the metadata API, there is 2 problems right now:

  1. I don't have access to the metadata API right now
  2. Querying the metadata API require an network request, not sure it will works well
francois2metz commented 3 years ago

I have done all the points (but the go mod tidy didn't have any effect) except the use of the metadata API.

cbruno10 commented 3 years ago

Hey @francois2metz , thanks for making the changes quickly! Sorry it took a while for me to get back to you with our other suggestions after some more testing. Please see below for additional suggestions, and let me know if you have any questions.

Connection Configuration

Error Handling

select id, created_time, jsonb_pretty(fields) as fields from airtable_features where id = 'recpICqN81XFoQJ61'

Error: status 404, err: HTTP request failure on /v0/appCJx0MKL2MsYjul/Features/recpICqN81XFoQJ61 with status 404
Body: {"error":{"type":"MODEL_ID_NOT_FOUND"}}

Similarly, when a table doesn't exist or the database ID provided in the config doesn't exist, are you able to handle these as well, e.g.,

select id, created_time, jsonb_pretty(fields) as fields from airtable_bugs_and_issues where id = 'recpICqN81XFoQJ61'

Error: status 404, err: HTTP request failure on /v0/appQLhYOg7THhtehb/Bugs%!a(MISSING)nd%!I(MISSING)ssues/recpICqN81XFoQJ61 with status 404
Body: {"error":{"type":"TABLE_NOT_FOUND","message":"Could not find table Bugs and Issues in application appQLhYOg7THhtehb"}}
select id, created_time, jsonb_pretty(fields) as fields from airtable_bugs_and_issues where id = 'recpICqN81XFoQJ61'

Error: status 404, err: HTTP request failure on /v0/appQLhYOg7THhteh/Bugs%!a(MISSING)nd%!I(MISSING)ssues/recpICqN81XFoQJ61 with status 404
Body: {"error":"NOT_FOUND"}

API Handling

Examples

francois2metz commented 3 years ago

Hi @cbruno10,

Thanks a lot for the review and the suggestions.

I did all the stuff above and I released the version 0.0.3.

Does Airtable's API support retry and backoff today? If so, is this already handled in the SDK or something you can add?

The SDK handle the rate limit. I never ran into an Airtable error (and I use this plugin quite often).

In docs/tables/airtable_table.md, in the last example, the last line has #>>'{}', is this meant to be part of the query?

Yes it is. It's a way to get the real string value out of a jsonb string field :exploding_head:

cbruno10 commented 3 years ago

Thanks for the quick updates @francois2metz !

We recently released the CSV plugin (https://hub.steampipe.io/plugins/turbot/csv), and based off of that release, we have some additional suggestions for compatibility with the CLI + Hub:

I believe that after these changes are we done, we'll be ready for publishing the initial release.

If you have any questions, please let me know!

francois2metz commented 3 years ago

All done! Closing