home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

where issue = 595492608 and user = 2448579 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

These facets timed out: author_association, issue

user 1

  • dcherian · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
965599998 https://github.com/pydata/xarray/issues/3942#issuecomment-965599998 https://api.github.com/repos/pydata/xarray/issues/3942 IC_kwDOAMm_X845jeL- dcherian 2448579 2021-11-10T18:01:46Z 2021-11-10T18:01:46Z MEMBER

Please may I ask: Why not default to xarray encoding time as 'units': 'nanoseconds since 1970-01-01' to be consistent with np.datetime64[ns]?

It's choosing the highest resolution that matches the data, which has the benefit of allowing the maximum possible time range given the data's frequency: https://github.com/pydata/xarray/blob/5871637873cd83c3a656ee6f4df86ea6628cf68a/xarray/coding/times.py#L317-L319

I'm not sure if this is why it was originally chosen; but that is one advantage. Perhaps @spencerkclark has some insight here.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Time dtype encoding defaulting to `int64` when writing netcdf or zarr 595492608
965591847 https://github.com/pydata/xarray/issues/3942#issuecomment-965591847 https://api.github.com/repos/pydata/xarray/issues/3942 IC_kwDOAMm_X845jcMn dcherian 2448579 2021-11-10T17:52:20Z 2021-11-10T17:52:20Z MEMBER

let's definitely add a note to the documentation to say that it might be a good idea for users to manually specify the encoding for datetimes if they wish to append to Zarrs.

:+1:

However I think xarray should raise an error when trying to append times that cannot be represented by the on-disk encoding.

Adding this error message would make it obvious that this is happening. PRs are very welcome!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Time dtype encoding defaulting to `int64` when writing netcdf or zarr 595492608
610429922 https://github.com/pydata/xarray/issues/3942#issuecomment-610429922 https://api.github.com/repos/pydata/xarray/issues/3942 MDEyOklzc3VlQ29tbWVudDYxMDQyOTkyMg== dcherian 2448579 2020-04-07T14:46:06Z 2020-04-07T14:46:06Z MEMBER

I have run in to this problem before.

The initial choice to use int64 and days since ... is perfectly valid. However I think xarray should raise an error when trying to append times that cannot be represented by the on-disk encoding.

Note that you can always specify an encoding to make sure that you can append properly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Time dtype encoding defaulting to `int64` when writing netcdf or zarr 595492608

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 6879.621ms · About: xarray-datasette