DB
Database Usage Guide for Quantit
This document is intended for internal research purposes only at Quantit and explains how to interact with various databases using our system.
Disclaimer
The data discussed in this document is for internal use only and should not be shared outside of authorized Quantit personnel.
The databases are read-only; only
SELECT
queries are permitted. Other types of SQL operations will not execute.
Query Constraints
The maximum length for SQL queries is 1,000 characters. This limit may increase in the future.
Complex SQL constructs like
JOIN
,UNION
, andSUBSELECT
are not currently supported, though this may change based on future requirements.Basic checks are in place to prevent SQL injection. Blacklisted characters include
;
,--
,/*
,*/
, and`
.Queries automatically include a
LIMIT
clause for performance reasons. If noLIMIT
is specified, it defaults to 10,000. The maximum limit is 1,000,000.
Available Databases
fnguide
spglobal
etfg
Database Links
fnguide spec: Download here
spglobal specs:
Compustat: Download here
GICS: Download here
nasdaq etfg spec: Download here
Python Code Examples
Importing the database module
Initializing the database object
Listing the first five available tables in the database
Getting column names of a specific table
Executing a query
Example query result
This guide provides an overview of how to access and use the databases provided for internal research at Quantit. Please adhere strictly to the guidelines and constraints specified.
Last updated