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

Notion Plugin returning null Dates (created and last edited work OK) #25

Closed
gigena-git opened this issue Dec 9, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@gigena-git
Copy link

Hello! I've recently come across this project and wanted to give it a try to solve an issue I'm working on. So far results have been promising. While testing with a database of mine I observed the following:

According to the notion plugin guide after I import a Notion database into Anyquery, I should see dates with the following format:

  • YYYY-MM-DDTHH:MM:SSZ for single dates.
  • YYYY-MM-DDTHH:MM:SSZ/YYYY-MM-DDTHH:MM:SSZ for double dates.

However, after I connect a database that has two Date property fields, I always get null on the dates. Lets say, when I do:

anyquery - q "SELECT `Review Date`, `Timeline Dates` FROM notion_database;"

I get this as a result:

+-------------+----------------+
| Review Date | Timeline Dates |
+-------------+----------------+
| <null>      | <null>         |
| <null>      | <null>         |
+-------------+----------------+

even though all 4 cells contain non null values. I get the same result whenever I run anyquery -q "SELECT * FROM notion_database;".
It should be noted that both _created_time and _last_edited_time do work ok, since when I run:

anyquery -q "SELECT _created_time, _last_edited_time FROM notion_database;"

I get non-null results:

+----------------------+----------------------+
| _created_time        | _last_edited_time    |
+----------------------+----------------------+
| 2022-08-05T21:32:00Z | 2024-11-13T20:41:00Z |
| 2022-08-05T21:32:00Z | 2024-11-25T18:10:00Z |
+----------------------+----------------------+

I don't know if this is an issue with my database or if I forgot to configure something.

@julien040 julien040 self-assigned this Dec 9, 2024
@julien040 julien040 added the bug Something isn't working label Dec 9, 2024
@julien040
Copy link
Owner

Hi @gigena-git!
Thank you for reporting this.

No worries, the error was on the plugin side. I forgot a return, which led to date fields returning NULL. The bug is now fixed in the 0.1.3 version of the Notion plugin.

To update it, run

anyquery registry refresh
anyquery plugin update notion

@gigena-git
Copy link
Author

Great! I can see the dates now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants