home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 922099793 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 2

  • simonw 7
  • codecov[bot] 1

author_association 2

  • OWNER 7
  • NONE 1

issue 1

  • sqlite-utils memory command for directly querying CSV/JSON data · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
864099764 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-864099764 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2NDA5OTc2NA== simonw 9599 2021-06-18T14:59:27Z 2021-06-18T14:59:27Z OWNER

I'm going to merge this as-is and work on the JSON/TSV support in a separate issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862817185 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862817185 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjgxNzE4NQ== codecov[bot] 22429695 2021-06-17T00:15:34Z 2021-06-17T00:15:34Z NONE

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@78aebb6). Click here to learn what that means. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #273 +/-

======================================= Coverage ? 96.10%
======================================= Files ? 4
Lines ? 1873
Branches ? 0
======================================= Hits ? 1800
Misses ? 73
Partials ? 0
```


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 78aebb6...df7a37b. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862605436 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862605436 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjYwNTQzNg== simonw 9599 2021-06-16T18:19:05Z 2021-06-16T18:19:05Z OWNER

--attach documentation: https://github.com/simonw/sqlite-utils/blob/192dc2c5b73bd836ab8e2e5fed4b36c6ea02f250/docs/cli.rst#joining-in-memory-data-against-existing-databases-using-attach

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862046009 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862046009 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjA0NjAwOQ== simonw 9599 2021-06-16T05:15:38Z 2021-06-16T05:15:38Z OWNER

I'm going to add a --encoding option - it will affect ALL CSV input files, so if you have CSV files with different encodings you'll need to sort that mess out yourself (likely by importing each CSV file separately into a database using sqlite-utils insert with different --encoding values).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862045639 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862045639 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjA0NTYzOQ== simonw 9599 2021-06-16T05:14:38Z 2021-06-16T05:14:38Z OWNER

Can't share much code though since a bunch of that insert stuff is specific to that command - showing progress bars, returning errors on illegal option combinations etc.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862045438 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862045438 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjA0NTQzOA== simonw 9599 2021-06-16T05:14:00Z 2021-06-16T05:14:00Z OWNER

I should probably refactor the CSV/JSON/loading stuff into a function in utils.py in order to share some of the implementation with the existing sqlite-utils insert code: https://github.com/simonw/sqlite-utils/blob/287cdcae8908916687f2ecccc87c38549d004ac6/sqlite_utils/cli.py#L691-L734

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862043974 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862043974 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjA0Mzk3NA== simonw 9599 2021-06-16T05:10:12Z 2021-06-16T05:10:12Z OWNER

I can stop promoting :memory: here and promote memory instead:

https://github.com/simonw/sqlite-utils/blob/c7234cae8336b8525034e8f917d82dd0699abd42/docs/cli.rst#L83-L86

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  
862042110 https://github.com/simonw/sqlite-utils/pull/273#issuecomment-862042110 https://api.github.com/repos/simonw/sqlite-utils/issues/273 MDEyOklzc3VlQ29tbWVudDg2MjA0MjExMA== simonw 9599 2021-06-16T05:05:51Z 2021-06-16T05:06:11Z OWNER

Initial documentation is here: https://github.com/simonw/sqlite-utils/blob/c7234cae8336b8525034e8f917d82dd0699abd42/docs/cli.rst#running-queries-directly-against-csv-data

It only talks about CSV at the moment - needs to be updated to mention JSON too once that is implemented.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils memory command for directly querying CSV/JSON data 922099793  

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,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
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 19.394ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows