@@ -23,7 +23,7 @@ Often, the SQL API is used to enable internal or self-serve
2323
2424### <--{"id" : " SQL API" }--> Supported Tools
2525
26- Cube SQL API has been tested with
26+ Cube SQL API has been tested with the following tools:
2727
2828- psql CLI
2929- Apache Superset
@@ -42,11 +42,33 @@ Cube SQL API has been tested with
4242
4343<InfoBox >
4444
45- Please see [ this GitHub issue] ( https://github.com/cube-js/cube/issues/3906 ) for
46- the tools roadmap and to suggest and vote for tools of your interest .
45+ Please use [ this GitHub issue] ( https://github.com/cube-js/cube/issues/3906 )
46+ to suggest tools of your interest and vote for already proposed ones .
4747
4848</InfoBox >
4949
50+ ## Configuration
51+
52+ ### <--{"id" : " Configuration" }--> Cube Core
53+
54+ SQL API is configured via [ environment variables] [ ref-config-env ] .
55+
56+ To enable the SQL API, set ` CUBEJS_PG_SQL_PORT ` to a port number you'd like
57+ to connect to with a Postgres-compatible tool.
58+
59+ Use ` CUBEJS_SQL_USER ` and ` CUBEJS_SQL_PASSWORD ` to configure credentials
60+ required to connect to the SQL API. You can also use
61+ [ ` checkSqlAuth ` ] [ ref-config-checksqlauth ] , [ ` canSwitchSqlUser ` ] [ ref-config-canswitchsqluser ] ,
62+ and ` CUBEJS_SQL_SUPER_USER ` to configure [ custom authentication] [ ref-sql-api-auth ] .
63+
64+ ### <--{"id" : " Configuration" }--> Cube Cloud
65+
66+ To enable the SQL API in Cube Cloud, click  ; <Btn >Deploy SQL API</Btn > on
67+ the  ; <Btn >Overview</Btn > page, then click  ; <Btn >How to connect your BI
68+ tool</Btn >. You should then see the following screen:
69+
70+ ![ SQL API details modal|690x428] ( https://ucarecdn.com/67508334-1641-43ec-9d50-a8f64629992b/ )
71+
5072## Querying Fundamentals
5173
5274Under the hood, SQL API uses
@@ -240,14 +262,6 @@ Limit push down is supported by Cube however, a limit over 50,000 can't be
240262overridden. In future versions, paging and streaming would be used to avoid this
241263limitation.
242264
243- ## Enabling SQL API in Cube Cloud
244-
245- To enable the SQL API in Cube Cloud, click  ; <Btn >Deploy SQL API</Btn > from
246- the  ; <Btn >Overview</Btn > page, then click <Btn >How to connect your BI
247- tool</Btn >. You should then see the following screen:
248-
249- ![ SQL API details modal|690x428] ( https://ucarecdn.com/67508334-1641-43ec-9d50-a8f64629992b/ )
250-
251265## Examples
252266
253267Consider the following data model:
@@ -519,6 +533,10 @@ WHERE is_completed = true
519533
520534[ ref-config-js ] : /config
521535[ ref-dynamic-schemas ] : /schema/dynamic-schema-creation
536+ [ ref-config-env ] : /reference/environment-variables
537+ [ ref-sql-api-auth ] : /backend/sql/security
538+ [ ref-config-checksqlauth ] : /config#options-reference-check-sql-auth
539+ [ ref-config-canswitchsqluser ] : /config#options-reference-can-switch-sql-user
522540[ ref-bi ] : /config/downstream#bi-data-exploration-tools
523541[ ref-superset ] : /config/downstream/superset
524542[ ref-tableau ] : /config/downstream/tableau
@@ -528,4 +546,4 @@ WHERE is_completed = true
528546[ ref-low-code ] : /config/downstream#low-code-tools-internal-tool-builders
529547[ ref-retool ] : /config/downstream/retool
530548[ postgres-protocol ] : https://www.postgresql.org/docs/current/protocol.html
531- [ cube-issbi ] : https://cube.dev/use-cases/semantic-layer
549+ [ cube-issbi ] : https://cube.dev/use-cases/semantic-layer
0 commit comments