Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.56k stars 1.56k forks source link

Airtable connector not returning full schema #1027

Closed mjashanks closed 3 years ago

mjashanks commented 3 years ago

Describe the bug When I create a new Airtable query, and "Run Query", the JSON returned by Airtable does not include all my columns. So, these columns aren't available in my query.

I believe that the missing columns are ones that have no value in row number 1 of the table.

To Reproduce Steps to reproduce the behavior:

  1. Find an Airtable table that has some rows,
  2. Add a new number column (works with other types too)
  3. Create a new query to that table

RESULT: the JSON returned in the builder does not have your new column

Expected behavior My new column should exist in the JSON

Desktop (please complete the following information):

stickyburn commented 3 years ago

Hello! I'd like to pick this issue if no one else is working on it :)

shogunpurple commented 3 years ago

Thanks @yashank09! Let us know if you have any questions.

stickyburn commented 3 years ago

Hi @shogunpurple ! I'm not able to run a query and get response from my Airtable.., will you be able to give me a reference/example?

I've created a simple table with a field called Score, which has it's first row as empty. I have also created a boolean named Accepted that contains a value for each row. I used my Airtable's API key when asked by Budibase, and seem to have the right names for all my tables/views. On running a query to read all records, I get an empty response back. Thanks!

shogunpurple commented 3 years ago

Hey @yashank09, to set up an airtable query:

Here's a loom showing how to set it up:

https://www.loom.com/share/be230a92cda44914bc7dbec6a5ed19ac

stickyburn commented 3 years ago

Hey @shogunpurple , I have cross checked several times and all my settings look fine.., so there must be something silly I'm missing? I should be able to figure it out, but just to give you an update, here's my table and source settings- airtable_query

air_table

Maybe something in the parameters itself? I'm assuming I should get my whole table without any parameters?

shogunpurple commented 3 years ago

@yashank09 that's very strange. When you run that query, does it just say there are no results, or do you get an error?

stickyburn commented 3 years ago

It returns a query with no results. I have recreated the source multiple times, not sure what I'm missing...

I also seem to have this UI bug on Vivaldi browser(chrome 88.0). If anyone can confirm, I will file a separate thread for this. https://imgur.com/a/5ala3yG

shogunpurple commented 3 years ago

Ah - @mjashanks @yashank I know why this happens now. It's because the schema is derived from the first row in the response. It doesn't parse every single row to get all the columns available. For certain data sources, they will return the key of the object, but for airtable it omits the key entirely for empty columns.

I will add code to parse all of the response and return the schema, which should account for this if at least one column has the field defined.

Caterina1994 commented 3 years ago

Hi! I run my query putting the table name and "Grid view" but it wont work.

shogunpurple commented 3 years ago

@Caterina1994 ok, do you get an error when you run your query? What does your configuration look like?

Caterina1994 commented 3 years ago

@shogunpurple , yes I get an error in blue that says: "Query results empty. Please execute query with results to create your schema".

What do you mean my configuration? My table is just a Grid View

shogunpurple commented 3 years ago

Query results empty. Please execute query with results to create your schema

Do you have any records in your table?

Caterina1994 commented 3 years ago

Yes I do! @shogunpurple

shogunpurple commented 3 years ago

@Caterina1994 This could happen if the first row in your table is empty? Airtable omits fields if they are empty - that's the issue @yashank09 had above. We have fixed this and it will be released tomorrow.

I'm unable to recreate this on the latest released version of the builder with a table that has every row defined.

Caterina1994 commented 3 years ago

Hello @shogunpurple my first row is not empty . Can there be another problem?

stickyburn commented 3 years ago

Hello @shogunpurple my first row is not empty . Can there be another problem?

any chance you could post a screenshot of the table with the view name etc. ?

Caterina1994 commented 3 years ago
Captura de Pantalla 2021-02-24 a la(s) 20 15 48 Captura de Pantalla 2021-02-24 a la(s) 20 14 59
stickyburn commented 3 years ago

@Caterina1994 Ah, I see a slight typo in your view names. Try changing the Budibase view name to 'Grid view'(lowercase v) instead and hopefully it will do the trick :)

shogunpurple commented 3 years ago

That would do it! I've done that myself actually. Great catch @yashank09

Caterina1994 commented 3 years ago

Hey! Still nothing

Captura de Pantalla 2021-02-25 a la(s) 18 49 45
shogunpurple commented 3 years ago

Hi @Caterina1994 - you will be pleased to know we have performed significant updates to the builder and the latest version of budibase is now available.

Please try and see if your issue still persists on the latest version, and if it does we will debug.

Caterina1994 commented 3 years ago

Great @shogunpurple how do i get the last version?

Caterina1994 commented 3 years ago

I have the new version. but still cant connect with airtable ![Uploading Captura de Pantalla 2021-02-25 a la(s) 20.06.45.png…]()

shogunpurple commented 3 years ago

Hi @Caterina1994 - it seems like your screenshot is not working.

I have tried many times to recreate this and cannot, with any airtable base.

Could you please screenshot your airtable query on the current version of budibase, and show me that that your configuration is exactly like the following (according to the airtable base screenshot you sent earlier):

Screenshot 2021-02-25 at 20 12 25

Caterina1994 commented 3 years ago

Hey! Yes here is a screenshot

Captura de Pantalla 2021-02-25 a la(s) 21 20 21 Captura de Pantalla 2021-02-25 a la(s) 21 20 27
shogunpurple commented 3 years ago

@Caterina1994 - looking at your screenshot above, your base is called fac_horarios, not your table. Your table is called “Imported table”. Please update your config to look identical to mine above.

Caterina1994 commented 3 years ago

It WORKED!!!!!! :D:D:DD:D:D thanksss @shogunpurple

Caterina1994 commented 3 years ago

The Only problem now is that it doesnt bring the data to design :(

Captura de Pantalla 2021-02-25 a la(s) 22 41 54 Captura de Pantalla 2021-02-25 a la(s) 22 36 58
shogunpurple commented 3 years ago

Que bien! Veo que de Airtable tu hables Español. Aprendo desde hace algunos meses - pero necisito practicar mas 😆

Por favor díga nos si tiene alguna pregunta!

Caterina1994 commented 3 years ago

jajaj si hablo español. La pregunta es : ¿Porque no me trae la información a la tabla? Its not reading my query

shogunpurple commented 3 years ago

Hmmm, lo probé y no puedo verlo.

Your configuration in the design panel looks good.

Is there anything in your developer console? It looks like an error may have occurred when you rendered your grid component. Also make sure that you save your query in the data sources section before using it in design.

Caterina1994 commented 3 years ago

Hey @shogunpurple I have my query already done correctly. But my budibase wotn read my database. I also had a problem with a csv i put .. My data wont show in the design panel .. ANd when i look at my web app this error appears:

Captura de Pantalla 2021-03-01 a la(s) 8 53 26

So i think it is an error comingo from the budibase itself and not airtable or csv input.

shogunpurple commented 3 years ago

@Caterina1994 did you update your self hosted installation of budibase before that happened?