home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

10 rows where "created_at" is on date 2017-10-24 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: milestone, comments, created_at (date), closed_at (date)

state 2

  • closed 9
  • open 1

type 1

  • issue 10

repo 1

  • datasette 10
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app reactions draft state_reason
268176505 MDU6SXNzdWUyNjgxNzY1MDU= 34 Support CSV export with a .csv extension simonw 9599 closed 0     1 2017-10-24T20:34:43Z 2021-06-17T18:14:48Z 2018-05-28T20:45:34Z OWNER  

Maybe do this using streaming with multiple pagination SQL queries so we can support arbritrarily large exports.

How would this work against a view which doesn’t have an obvious efficient pagination mechanism? Maybe limit views to up to 1000 exported records?

Relates to #5

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/34/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
267886330 MDU6SXNzdWUyNjc4ODYzMzA= 27 Ability to plot a simple graph simonw 9599 closed 0     3 2017-10-24T03:34:59Z 2018-07-10T17:52:41Z 2018-07-10T17:52:41Z OWNER  

Might be as simple as: pick he type of chart (bar, line) and then pick the column for the X axis and the column for the Y axis. Maybe also allow a pie chart. It’s up to the user to come up with SQL that gets the right values.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/27/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
268087542 MDU6SXNzdWUyNjgwODc1NDI= 31 Idea: colour scheme based on sha256 of db simonw 9599 closed 0   v1 stretch goals 2859414 1 2017-10-24T15:52:38Z 2018-05-28T18:10:45Z 2017-11-09T14:14:59Z OWNER  
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/31/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
268110769 MDU6SXNzdWUyNjgxMTA3Njk= 33 Use locust for benchmarking and load tests simonw 9599 open 0     0 2017-10-24T17:00:09Z 2017-12-10T03:12:16Z   OWNER  

https://github.com/locustio/locust

Needed for #32

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/33/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
   
267857622 MDU6SXNzdWUyNjc4NTc2MjI= 25 Endpoint that returns SQL ready to be piped into DB simonw 9599 closed 0     2 2017-10-24T00:19:26Z 2017-11-15T05:11:12Z 2017-11-15T05:11:11Z OWNER  

It would be cool if I could figure out a way to generate both the create table statements and the inserts for an individual table or the entire database and then stream them down to the client.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/25/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
268078453 MDU6SXNzdWUyNjgwNzg0NTM= 30 Do something neat with foreign keys simonw 9599 closed 0     1 2017-10-24T15:29:29Z 2017-11-14T18:29:08Z 2017-11-14T18:29:01Z OWNER  

https://www.sqlite.org/pragma.html#pragma_foreign_key_list

SQLite has robust support for introspecting foreign keys. I could use that to automatically link to the corresponding record from my tables.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/30/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
267861210 MDU6SXNzdWUyNjc4NjEyMTA= 26 Command line tool for uploading one or more DBs to Now simonw 9599 closed 0   Ship first public release 2857392 3 2017-10-24T00:43:10Z 2017-11-11T07:25:30Z 2017-11-11T07:25:30Z OWNER  

Uploading files appears to be undocumented, but I found it in their code here: https://github.com/zeit/now-cli/blob/0ca7d1fe44ebdf460b64fdc38ba543b8e295ac40/src/providers/sh/util/index.js#L291

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/26/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
268106803 MDU6SXNzdWUyNjgxMDY4MDM= 32 Try running SQLite queries in a separate thread simonw 9599 closed 0   v1 stretch goals 2859414 1 2017-10-24T16:48:42Z 2017-11-09T14:05:56Z 2017-11-09T14:05:56Z OWNER  

https://pymotw.com/3/asyncio/executors.html

Would be good to have some actual benchmarks so I can evaluate if this is worth it or not.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/32/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
267886865 MDU6SXNzdWUyNjc4ODY4NjU= 28 /database?sql= should redirect correctly simonw 9599 closed 0   Ship first public release 2857392 0 2017-10-24T03:38:44Z 2017-10-24T23:54:30Z 2017-10-24T23:54:30Z OWNER  

Needs to redirect to the location with the hash while retaining the query string. This should also work with the .json extension.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/28/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
268050821 MDU6SXNzdWUyNjgwNTA4MjE= 29 Handle bytestring records encoding to JSON simonw 9599 closed 0   Ship first public release 2857392 1 2017-10-24T14:18:45Z 2017-10-24T14:59:00Z 2017-10-24T14:58:47Z OWNER  

http://localhost:8006/northwind-40d049b/Categories.json 500s right now

The string representation of one of the values looks like this:

b"\x15\x1c/\x00\x02\x00

This is a bytestring from the database which cannot be naively converted to a unicode string.

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/29/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Advanced export

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

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 1067.641ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows