Back to plugin list
chess-com

Chess.com

This plugin is in preview.

Load chess games from the Chess.com API into any destination database (PostgreSQL, MySQL, etc)

Publisher

hermanschaaf

Repositorygithub.com
Latest version

v1.0.2

Type

Source

Platforms
Date Published

Price

Free

Set up process


brew install cloudquery/tap/cloudquery

1. Download CLI and login

See installation options

2. Create source and destination configs

Plugin configuration

cloudquery sync chess-com.yml postgresql.yml

3. Run the sync

CloudQuery sync

Overview

The Chess.com source plugin for CloudQuery loads data from the Chess.com API to any database, data warehouse or data lake supported by CloudQuery.

Configuration

Example configuration:
kind: source
spec:
  name: "chess-com"
  path: "hermanschaaf/chess-com"
  version: "v1.0.1"
  destinations:
    - "postgresql"
  tables:
    - "chess_com_games"
    - "chess_com_archives"
  spec:
    # plugin spec section
    usernames: # list of usernames to sync
     - magnuscarlsen
     - hikaru
     - gothamchess
  You can also use backend_options to configure incremental syncs:
kind: source
spec:
  name: "chess-com"
  path: "hermanschaaf/chess-com"
  version: "v1.0.1"
  backend_options:
    table_name: "chess_com_backend_options"
    connection: "@@plugins.postgresql.connection"
  destinations:
    - "postgresql"
  tables:
    - "chess_com_games"
    - "chess_com_archives"
  spec:
    # plugin spec section
    usernames: # list of usernames to sync
     - magnuscarlsen
     - hikaru
     - gothamchess

Example Queries

Playing around with this data can be pretty fun. The PGNs and FENs for all games are included and can easily be loaded into a Chess engine.
Here is one example query that shows a selection of 15 Magnus Carlsen games:
select 
  white->>'username' as white, 
  black->>'username' as black,
  white->>'result' as result_white,
  time_class
from chess_com_games 
where username = 'magnuscarlsen'
limit 15;
+------------------+------------------+--------------+------------+
| white            | black            | result_white | time_class |
|------------------+------------------+--------------+------------|
| MagnusCarlsen    | stepanosinovsky  | resigned     | rapid      |
| MagnusCarlsen    | solskytz         | win          | rapid      |
| MagnusCarlsen    | penguingm1       | win          | rapid      |
| MagnusCarlsen    | Darkcloudy       | win          | rapid      |
| MagnusCarlsen    | jbj              | win          | rapid      |
| MagnusCarlsen    | Kacparov         | win          | rapid      |
| MagnusCarlsen    | cool64chess      | win          | rapid      |
| MagnusCarlsen    | CP6033           | win          | rapid      |
| MagnusCarlsen    | Tildenbeatsu     | win          | rapid      |
| MagnusCarlsen    | RainnWilson      | win          | rapid      |
| MagnusCarlsen    | mtmnfy           | win          | rapid      |
| MagnusCarlsen    | TigranLPetrosyan | win          | blitz      |
| MagnusCarlsen    | TigranLPetrosyan | win          | blitz      |
| TigranLPetrosyan | MagnusCarlsen    | resigned     | blitz      |
| TigranLPetrosyan | MagnusCarlsen    | resigned     | blitz      |
+------------------+------------------+--------------+------------+


Subscribe to product updates

Be the first to know about new features.