Command line interface

The a3k command can be invoked from the shell as follows.

a3k: Relational interface to publication metadata

usage: a3k [-h] [-d DEBUG [DEBUG ...]] [-v]
           {help,populate,process,query,list-processes,list-complete-schema,list-source-schema,list-process-schema,list-sources,version}
           ...

Positional Arguments

command

Possible choices: help, populate, process, query, list-processes, list-complete-schema, list-source-schema, list-process-schema, list-sources, version

Name of the a3k operation to perform.

Named Arguments

-d, --debug
Output debuggging information as specfied by the arguments.

exception: Raise an exception when an error occurs; files-read: Counts of Crossref data files read; link: Record linking operations; sql: Executed SQL statements; perf: Performance timings; populated-counts: Counts of the populated database; populated-data: Data of the populated database; populated-reports: Query results from the populated database; progress: Report population progress; sorted-tables: Topologically ordered Crossref query tables; stderr: Log to standard error;

Default: []

-v, --version

Report program version and exit

Default: False

Sub-commands

help

Show top-level help message.

a3k help [-h]

populate

Populate an SQLite database.

a3k populate [-h] [-a ATTACH_DATABASES [ATTACH_DATABASES ...]] [-c COLUMNS [COLUMNS ...]] [-R ROW_SELECTION_FILE]
             [-r ROW_SELECTION] [-s SAMPLE]
             database {asjcs,crossref,doaj,funder-names,journal-names,orcid,ror} [data_location]

Positional Arguments

database

File path of the database to populate

data_name

Possible choices: asjcs, crossref, doaj, funder-names, journal-names, orcid, ror

Name of the data source to use

data_location

Path or URL of the source’s data

Named Arguments

-a, --attach-databases

Databases to attach for the row selection expression

-c, --columns

Columns to populate using table.column or table.*

-R, --row-selection-file

File containing SQL expression that selects the populated rows

-r, --row-selection

SQL expression that selects the populated rows

-s, --sample

Python expression to sample the Crossref tables (e.g. random.random() < 0.0002)

Default: “True”

process

Run a processing step on the specified database.

a3k process [-h] database {link-aa-base-ror,link-aa-top-ror,link-works-asjcs}

Positional Arguments

database

file path of the database to run the process on

process

Possible choices: link-aa-base-ror, link-aa-top-ror, link-works-asjcs

Name of the process to perform

query

Run a query directly on a data source.

a3k query [-h] [-a ATTACH_DATABASES [ATTACH_DATABASES ...]] [-E OUTPUT_ENCODING] [-F FIELD_SEPARATOR] [-H] [-o OUTPUT] [-P]
          (-Q QUERY_FILE | -q QUERY) [-s SAMPLE]
          {asjcs,crossref,doaj,funder-names,journal-names,orcid,ror} [data_location]

Positional Arguments

data_name

Possible choices: asjcs, crossref, doaj, funder-names, journal-names, orcid, ror

Name of the data source to use

data_location

Path or URL of the source’s data

Named Arguments

-a, --attach-databases

Databases to attach making them available to the query

-E, --output-encoding

Query output character encoding (use utf-8-sig for Excel)

Default: “utf-8”

-F, --field-separator

Character to use for separating query output fields

Default: “,”

-H, --header

Include a header in the query output

Default: False

-o, --output

Output file for query results

-P, --partition

Run the query over partitioned data slices. (Warning: arguments are run per partition.)

Default: False

-Q, --query-file

File containing query to run on the virtual tables

-q, --query

Query to run on the virtual tables

-s, --sample

Python expression to sample the Crossref tables (e.g. random.random() < 0.0002)

Default: “True”

list-processes

List available data processes.

a3k list-processes [-h]

list-complete-schema

List all data source and process schemas.

a3k list-complete-schema [-h]

list-source-schema

List all data source schemas (default) or the specified one.

a3k list-source-schema [-h] [{asjcs,crossref,doaj,funder-names,journal-names,orcid,ror}]

Positional Arguments

facility

Possible choices: asjcs, crossref, doaj, funder-names, journal-names, orcid, ror

list-process-schema

List the schema of all processes (default) or of the specified one.

a3k list-process-schema [-h] [{link-aa-base-ror,link-aa-top-ror,link-works-asjcs}]

Positional Arguments

facility

Possible choices: link-aa-base-ror, link-aa-top-ror, link-works-asjcs

list-sources

List available data sources

a3k list-sources [-h]

version

Report program version

a3k version [-h]