home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 1382457780 and user = 9599 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 · 2 ✖

issue 1

  • Ability to insert multi-line files · 2 ✖

author_association 1

  • OWNER 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1258437060 https://github.com/simonw/sqlite-utils/issues/490#issuecomment-1258437060 https://api.github.com/repos/simonw/sqlite-utils/issues/490 IC_kwDOCGYnMM5LAjnE simonw 9599 2022-09-26T18:24:44Z 2022-09-26T18:24:44Z OWNER

Just saw your great write-up on this: https://jeqo.github.io/notes/2022-09-24-ingest-logs-sqlite/

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
Ability to insert multi-line files 1382457780  
1256428818 https://github.com/simonw/sqlite-utils/issues/490#issuecomment-1256428818 https://api.github.com/repos/simonw/sqlite-utils/issues/490 IC_kwDOCGYnMM5K45US simonw 9599 2022-09-23T16:37:58Z 2022-09-23T16:38:35Z OWNER

It should be possible to achieve this with the --text option: https://sqlite-utils.datasette.io/en/stable/cli.html?highlight=text#convert-with-text

Given an example like this in multiline.log: 2022-03-01T12:04:52: Here is a log message that spans multiple lines 2022-03-01T12:04:52: This is a single line 2022-03-01T12:04:52: Here is another message that spans multiple lines You should be able to run something like this: ``` sqlite-utils insert /tmp/log.db log multiline.log --text --convert " import re

r = re.compile(r'^(?P<datetime>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}):(?P<log>.*)', re.MULTILINE)

def convert(text): return [m.groupdict() for m in r.finditer(text)] " After running this I get: sqlite-utils rows /tmp/log.db log [{"datetime": "2022-03-01T12:04:52", "log": " Here is a log message"}, {"datetime": "2022-03-01T12:04:52", "log": " This is a single line"}, {"datetime": "2022-03-01T12:04:52", "log": " Here is another message"}] ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to insert multi-line files 1382457780  

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 599.571ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows