home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 921878733 and "updated_at" is on date 2021-06-15 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 6

issue 1

  • Idea: import CSV to memory, run SQL, export in a single command · 6 ✖

author_association 1

  • OWNER 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
861891835 https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861891835 https://api.github.com/repos/simonw/sqlite-utils/issues/272 MDEyOklzc3VlQ29tbWVudDg2MTg5MTgzNQ== simonw 9599 2021-06-15T23:09:31Z 2021-06-15T23:09:31Z OWNER

--load-csv and --load-json and --load-nl and --load-tsv are unambiguous.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: import CSV to memory, run SQL, export in a single command 921878733  
861891693 https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861891693 https://api.github.com/repos/simonw/sqlite-utils/issues/272 MDEyOklzc3VlQ29tbWVudDg2MTg5MTY5Mw== simonw 9599 2021-06-15T23:09:08Z 2021-06-15T23:09:08Z OWNER

Problem: --csv and --json and --nl are already options for sqlite-utils query - need new non-conflicting names.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: import CSV to memory, run SQL, export in a single command 921878733  
861891272 https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861891272 https://api.github.com/repos/simonw/sqlite-utils/issues/272 MDEyOklzc3VlQ29tbWVudDg2MTg5MTI3Mg== simonw 9599 2021-06-15T23:08:02Z 2021-06-15T23:08:02Z OWNER

--csv - should work though, for reading from stdin. The table can be called stdin.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: import CSV to memory, run SQL, export in a single command 921878733  
861891110 https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861891110 https://api.github.com/repos/simonw/sqlite-utils/issues/272 MDEyOklzc3VlQ29tbWVudDg2MTg5MTExMA== simonw 9599 2021-06-15T23:07:38Z 2021-06-15T23:07:38Z OWNER

--csvt seems unnecessary to me: if people want to load different CSV files with the same filename (but in different directories) they will get an error unless they rename the files first.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: import CSV to memory, run SQL, export in a single command 921878733  
861890689 https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861890689 https://api.github.com/repos/simonw/sqlite-utils/issues/272 MDEyOklzc3VlQ29tbWVudDg2MTg5MDY4OQ== simonw 9599 2021-06-15T23:06:37Z 2021-06-15T23:06:37Z OWNER

How about --json and --nl and --tsv too? Imitating the format options for sqlite-utils insert.

And what happens if you provide a filename too? I'm tempted to say that the --csv stuff still gets loaded into an in-memory database but it's given a name and can then be joined against using SQLite memory.blah syntax.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: import CSV to memory, run SQL, export in a single command 921878733  
861889437 https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861889437 https://api.github.com/repos/simonw/sqlite-utils/issues/272 MDEyOklzc3VlQ29tbWVudDg2MTg4OTQzNw== simonw 9599 2021-06-15T23:03:26Z 2021-06-15T23:03:26Z OWNER

Maybe also support --csvt as an alternative option which takes two arguments: the CSV path and the name of the table that should be created from it (rather than auto-detecting from the filename).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: import CSV to memory, run SQL, export in a single command 921878733  

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 26.96ms · About: github-to-sqlite