Global Arguments

Global Arguments

Spectacles commands (eg. sql and assert) support their own command-specific CLI flags. In addition to these command specific flags, the Spectacles command itself supports “global” flags applicable to all subcommands.

All of these flags can also be set using a config file. When setting a flag in the config file, remember to change any dashes in the flag to underscores, i.e. --client-id 1234 translates to client_id: 1234. Many flags can also be set with environment variables.

--base-url

This flag is required.

The URL of your Looker instance, e.g. https://company-name.looker.com. The URL must include the https:// prefix.

Environment Variable: LOOKER_BASE_URL


--client-id

This flag is required.

The client ID of the Looker user that spectacles will authenticate as. You can find more information about generator Looker API keys here.

Environment Variable: LOOKER_CLIENT_ID


--client-secret

This flag is required.

The client secret of the Looker user that spectacles will authenticate as. You can find more information about generator Looker API keys here.

Environment Variable: LOOKER_CLIENT_SECRET


--port

The port of your Looker instance’s API. The default is port 19999.

Environment Variable: LOOKER_PORT


--api-version

The version of the Looker API to use. The default is version 3.1.

Environment Variable: LOOKER_API_VERSION


--verbose

This flag tells Spectacles to display debug logging during spectacles execution. It is useful for debugging and making bug reports. It can also be set with -v.

Environment Variable: N/A


--log-dir

The directory that Spectacles will write logs to. The default is logs.

Environment Variable: SPECTACLES_LOG_DIR


--do-not-track

This flag disables the anonymous event tracking built into Spectacles.

Environment Variable: SPECTACLES_DO_NOT_TRACK (to be set to True)

👉 Next: SQL Validator