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

[bug]: upload_table_to_gsheet : does not keep column ordered #127

Open
2 tasks done
armetiz opened this issue Dec 1, 2023 · 1 comment
Open
2 tasks done

[bug]: upload_table_to_gsheet : does not keep column ordered #127

armetiz opened this issue Dec 1, 2023 · 1 comment
Labels
bug-bigfunction Report a bug in a BigFunction

Comments

@armetiz
Copy link

armetiz commented Dec 1, 2023

Check the bug has not already been reported

Edit function_name and the short error description in title above

  • I wrote the correct function name and a short error description in the title above

What happened and what did you expect?

Hi there,

I'm uploading a BQuery table to GSheet using upload_table_to_gsheet.

It does not But columns are ordered alphabetically.

@armetiz armetiz added the bug-bigfunction Report a bug in a BigFunction label Dec 1, 2023
@unytics
Copy link
Owner

unytics commented Dec 21, 2023

Hi @armetiz.

Thanks a lot for opening this issue.

I had a look and could reproduce what you described.

After investigation, this is because:

  • this procedure converts the table data into a json before sending it to upload_to_gsheet function.
  • BigQuery json conversion reorders the fields alpabetically as seen in the following screenshot.

image

Then the only other way would be to generate a json string without passing by json and change upload_to_gsheet function signature to accept string instead of json as data.

Or maybe you have another suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-bigfunction Report a bug in a BigFunction
Projects
None yet
Development

No branches or pull requests

2 participants