issue_comments
21 rows where author_association = "OWNER", issue = 921878733 and user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, updated_at (date)
issue 1
- Idea: import CSV to memory, run SQL, export in a single command · 21 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
864476167 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-864476167 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2NDQ3NjE2Nw== | simonw 9599 | 2021-06-19T23:36:48Z | 2021-06-19T23:36:48Z | OWNER | Wrote this up on my blog here: https://simonwillison.net/2021/Jun/19/sqlite-utils-memory/ - with a video demo here: https://www.youtube.com/watch?v=OUjd0rkc678 |
{ "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 | |
864101267 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-864101267 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2NDEwMTI2Nw== | simonw 9599 | 2021-06-18T15:01:41Z | 2021-06-18T15:01:41Z | OWNER | I'll split the remaining work out into separate issues. |
{ "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 | |
862491016 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862491016 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjQ5MTAxNg== | simonw 9599 | 2021-06-16T15:46:13Z | 2021-06-16T15:46:13Z | OWNER | Columns from data imported from CSV in this way is currently treated as |
{ "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 | |
862485408 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862485408 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjQ4NTQwOA== | simonw 9599 | 2021-06-16T15:38:58Z | 2021-06-16T15:39:28Z | OWNER | Also And it helps emphasize that the file you are querying will be loaded into memory, so probably don't try this against a 1GB CSV file. |
{ "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 | |
862484557 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862484557 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjQ4NDU1Nw== | simonw 9599 | 2021-06-16T15:37:51Z | 2021-06-16T15:38:34Z | OWNER | I wonder if there's a better name for this than
I think |
{ "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 | |
862479704 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862479704 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjQ3OTcwNA== | simonw 9599 | 2021-06-16T15:31:31Z | 2021-06-16T15:31:31Z | OWNER | Plus, could I make this change to |
{ "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 | |
862478881 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862478881 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjQ3ODg4MQ== | simonw 9599 | 2021-06-16T15:30:24Z | 2021-06-16T15:30:24Z | OWNER | But... |
{ "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 | |
862475685 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862475685 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjQ3NTY4NQ== | simonw 9599 | 2021-06-16T15:26:19Z | 2021-06-16T15:29:38Z | OWNER | Here's a radical idea: what if I combined The trick here would be to detect if the arguments passed on the command-line refer to SQLite databases or if they refer to CSV/JSON data that should be imported into temporary tables. Detecting a SQLite database file is actually really easy - they all start with the same binary string: ```pycon
So then what would the semantics of
The complexity here is definitely in the handling of a combination of SQLite database files and CSV filenames. Also, I'm not 100% sold on this as being better than having a separate |
{ "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 | |
862040971 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862040971 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjA0MDk3MQ== | simonw 9599 | 2021-06-16T05:02:56Z | 2021-06-16T05:02:56Z | OWNER | Moving this to a PR. |
{ "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 | |
862040906 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862040906 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjA0MDkwNg== | simonw 9599 | 2021-06-16T05:02:47Z | 2021-06-16T05:02:47Z | OWNER | Got a prototype working!
|
{ "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 | |
862018937 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-862018937 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MjAxODkzNw== | simonw 9599 | 2021-06-16T03:59:28Z | 2021-06-16T04:00:05Z | OWNER | Mainly for debugging purposes it would be useful to be able to save the created in-memory database back to a file again later. This could be done with:
Can use Maybe instead (or as-well-as) offer |
{ "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 | |
861989987 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861989987 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MTk4OTk4Nw== | simonw 9599 | 2021-06-16T02:34:21Z | 2021-06-16T02:34:21Z | OWNER | The documentation already covers this
|
{ "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 | |
861987651 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861987651 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MTk4NzY1MQ== | simonw 9599 | 2021-06-16T02:27:20Z | 2021-06-16T02:27:20Z | OWNER | Solution: |
{ "total_count": 1, "+1": 1, "-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 | |
861985944 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861985944 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MTk4NTk0NA== | simonw 9599 | 2021-06-16T02:22:52Z | 2021-06-16T02:22:52Z | OWNER | Another option: allow an optional
One catch: how to treat
That's fine for CSV, but what about TSV or JSON or nl-JSON? Maybe this:
Bit weird though. The alternative would be to support this:
But that's verbose compared to the version without the long |
{ "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 | |
861984707 | https://github.com/simonw/sqlite-utils/issues/272#issuecomment-861984707 | https://api.github.com/repos/simonw/sqlite-utils/issues/272 | MDEyOklzc3VlQ29tbWVudDg2MTk4NDcwNw== | simonw 9599 | 2021-06-16T02:19:48Z | 2021-06-16T02:19:48Z | OWNER | This is going to need to be a separate command, for relatively non-obvious reasons.
Is equivalent to this, because
But... this means that making the filename optional doesn't actually work - because then this is ambiguous:
So instead, I'm going to add a new sub-command. I'm currently thinking
I still think I need to use Another option: allow multiple arguments which are filenames, and use the extension (or sniff the content) to decide what to do with them:
This would require the last positional argument to always be a SQL query, and would treat all other positional arguments as files that should be imported into memory. |
{ "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 | |
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 |
|
{ "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: |
{ "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 |
|
{ "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 |
|
{ "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 And what happens if you provide a filename too? I'm tempted to say that the |
{ "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 |
{ "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
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]);
user 1