How Orion connects
A few principles apply to every connection:Read-only
SELECT and metadata introspection).
It never runs DDL, DML, or stored procedures against your systems.Least privilege
Encrypted at rest
Choose your data source
BigQuery
Snowflake
Databricks
Looker
PostgreSQL
MySQL
Redshift
Amazon Athena
Microsoft Fabric
Delta Lake
dbt
BigQuery
Orion connects to BigQuery using service account impersonation. You create a service account in your project and grant Orion’s service account permission to impersonate it. No credentials or keys are ever shared.Create a service account
- Go to Google Cloud Console → IAM & Admin → Service Accounts
- Click Create Service Account
- Name:
external-orion-data-access(or your preferred naming) - Description: “Service account for Orion data access”
- Click Create and Continue
- Skip role assignment for now → click Done
Enable service account impersonation
- Navigate to IAM & Admin → Service Accounts
- Find the BigQuery Service Account you just created
- Select the Principals With Access tab and click Grant Access
- Add principal: the Orion Service Account email you received from Orion
- Assign role: Service Account Token Creator
- Click Save
Create a scratch dataset and grant edit access
- Navigate to BigQuery
- Create a new dataset, a dedicated dataset reserved for Orion’s use (we recommend a descriptive name like
orion_scratch) - Grant the BigQuery Service Account Data Editor access to this dataset
Grant table-level access
- Select the dataset → click Share Dataset
- Add the BigQuery Service Account email
- Assign role: BigQuery Data Viewer
- Click Add, then Done
Grant project-level access
- Navigate to IAM
- Locate your BigQuery Service Account and click Edit
- Assign the roles: BigQuery Job User, BigQuery Connection User, and BigQuery Read Session User
- Click Save
Enter the connection in Orion

Querying datasets in another project
Orion separates the project that runs your queries from the project that stores your data. The two roles map to the two form fields:- Project ID is the compute and billing project. The service account, the scratch dataset, and every query job live here. Grant BigQuery Job User, BigQuery Connection User, and BigQuery Read Session User on this project (step 5), plus Data Editor on the scratch dataset (step 3).
- Data Project ID is where your source datasets live. Grant the service account BigQuery Data Viewer on those datasets (step 4).
Per-user OAuth (optional)
By default, Orion queries BigQuery through the shared service account above. With per-user OAuth, Orion instead runs each person’s BigQuery queries under their own Google identity, so what each user can see in Orion follows the BigQuery permissions they already have, rather than a single shared service account.Create an OAuth client in Google Cloud
- In APIs & Services → OAuth consent screen, set the User type to Internal so only your Google Workspace users can sign in
- In APIs & Services → Credentials, click Create Credentials → OAuth client ID
- Application type: Web application
- Add the Authorized redirect URI provided by your Gravity contact. It points at Orion’s OAuth callback, for example
https://g.runorion.com/datasource/bq-oauth/callback - Click Create, then copy the Client ID and Client Secret
Enter the OAuth client in Orion
Each user connects their Google account
- Scheduled work runs as its creator. A metric or workflow that someone schedules runs under that person’s connected account. Work with no individual owner uses the service account.
- If a user disconnects or loses BigQuery access, their scheduled work pauses until they reconnect. This is deliberate: Orion never falls back to broader access than the user has.
Snowflake
Orion connects to Snowflake using key pair authentication. You create a dedicated service user, grant it read-only access to the data you want analyzed, and associate a public key with it. Orion holds the matching private key to authenticate. Connection informationGenerate an encrypted key pair
rsa_key.pub) is added to the Snowflake user.Create (or reuse) a service user
Associate the public key with the service user
Enter the connection in Orion
Databricks
Orion connects to Databricks using a dedicated Service Principal and a SQL Warehouse for compute. We strongly recommend OAuth M2M authentication.Create a Service Principal
Create credentials
OAuth M2M (recommended)
Personal Access Token (legacy)
Create or identify a SQL Warehouse
Grant access
Configure the connection in Orion
Looker
Orion connects to Looker using a dedicated user account with analyst-level (read-only) permissions plus API credentials. You’ll also grant the account access to the Spaces (folders) that hold your dashboards and Looks. Standard deployment: We request a Looker account for the emailorion@gravity.foundation, with permissions matching those of a typical analyst at your organization. Orion only needs read access.
Required permissions (in addition to analyst-level access)
- Models (docs): can be scoped to necessary models via model sets; includes the
explorepermission see_system_activity,see_lookml,see_sqlsee_user_dashboards(or provide PDFs of sample dashboards instead)create_custom_fields: enables building custom fields via + Addlogin_special_email: only if using non-email (third-party) authentication
Open the folder
Manage access
Add the Orion user
orion@gravity.foundation (docs). Then, in Orion, go to Configuration → Data Sources, click Add Data Source, choose Looker, and enter your Looker base URL, the client_id, and the client_secret.
Third-party authentication: If you use Okta or another third-party provider, add the login_special_email permission. Navigate to the Roles section of the Admin panel (https://[organization].cloud.looker.com/admin/roles) and, if you don’t already have external users, create a new permission set. See the Looker documentation.
LookML augmentation (optional)
Beyond querying dashboards and Looks, Orion can read your LookML business logic directly from its GitHub repository, reusing the dimensions, measures, and joins you have already defined to write better SQL. Setup takes about 10 minutes and needs a GitHub repository admin for one step.Open the Looker datasource

Start token creation

Create a fine-grained PAT

Set the resource owner and expiration
- Resource owner: select the organization or account where the Looker GitHub repository lives.
-
Expiration (TTL): set the token expiration. We recommend the longest your security policy allows; GitHub’s maximum for fine-grained tokens is 1 year (366 days).

Select the repository
Set permissions
- Contents: Read-only
-
Metadata: Read-only

Create the token
Save the configuration
Grant the token's account access to the repository
- In GitHub, open the LookML repository → Settings → Collaborators and teams (under Access).
- Under Manage access, click Add people (or Add teams if you manage access by team).
- Enter the username of the account tied to the token, or the service account created for Orion.
- Set the role to Read. No write or admin access is required.
- Send the invitation.
- The account owner accepts the invite. Until they do, access does not take effect and the connection will still fail.
-
Return to the Orion connection and reconnect.

Test the connection
- Success: the connection is valid. Orion can authenticate and see the repo. Click Sync Now to pull the LookML files. When it finishes, Status shows Synced, along with the file count and the latest commit.
- Failure: read the error message:
- “Repository or branch not found” usually means the token’s account lacks Read access to the repo (revisit Step 9), or the branch name is wrong. Leave Branch blank to use the repo default, or enter the correct branch.
- “Authentication failed” means the token is invalid or expired. Generate a new one (Steps 3-7) and re-enter it.
- “Access forbidden” means the token is missing a permission or, if your org enforces SSO, has not been SSO-authorized for the organization.
PostgreSQL
Orion connects to PostgreSQL with username/password authentication. Create a dedicated read-only user and grant itSELECT on the schemas and tables you want analyzed.
Connection information
Create the service user
Configure PostgreSQL for connections
postgresql.conf: set listen_addresses = '*' so PostgreSQL accepts connections, and ssl = on for SSL connections.Configure client authentication
pg_hba.conf:Restart and grant
Enter the connection in Orion
MySQL
Orion connects to MySQL with username/password authentication. Create a dedicated user and grant it read-only access to the target database. Connection informationCreate the service user
<host_or_%> with the IP/CIDR Orion will connect from (e.g. 'orion_svc'@'10.0.0.0/8'), or use '%' to allow any source.Configure MySQL for connections
my.cnf (or mysqld.cnf):ALTER USER 'orion_svc'@'<host_or_%>' REQUIRE SSL;Restart and grant
Enter the connection in Orion
Redshift
Orion connects to Amazon Redshift (cluster or Serverless workgroup) over the standard PostgreSQL wire protocol (port5439) using username/password authentication. Orion only ever issues read (SELECT) queries.
Connection details
information_schema if it has
been granted access, so these grants also determine what Orion can discover.5439 from Orion’s egress IP range in the cluster’s VPC security group. See the docs on managing Redshift security groups.
Enter the connection in Orion: go to Configuration → Data Sources, click Add Data Source, choose Amazon Redshift, and enter the connection details from the table above.
↑ Back to all data sources
Amazon Athena
Orion connects to Amazon Athena to run serverless SQL over data in S3. Table and column metadata comes from your AWS Glue Data Catalog; queries run through Athena and write their results to an S3 output location you control. Orion only ever issues read (SELECT) queries against your tables.
Authentication uses an IAM access key for a dedicated user. You create the user, attach a least-privilege policy, and enter the access key ID and secret in Orion.
Create a dedicated IAM user
orion-athena) with programmatic access, then create an access key for it. Copy the Access Key ID and Secret Access Key; the secret is only shown once.Attach a least-privilege policy
Confirm the workgroup and output location
Enter the connection in Orion
primary / AwsDataCatalog) unless you use custom ones, and set Database only if you want to limit schema discovery to one Glue database.- IAM access key only. Cross-account IAM role assumption is a planned fast-follow; today the connection uses a long-lived access key, so rotate it on your normal cadence.
- Output location is mandatory. Athena cannot run a query without a place to write results, so the workgroup must enforce one or you must supply the S3 Output Location.
- dbt enrichment is supported on Athena connections (see dbt); semantic enrichment from a Looker connection can also be projected onto Athena schemas.
Microsoft Fabric
Orion connects to a Microsoft Fabric Warehouse using a Service Principal (App Registration) in your Microsoft Entra ID tenant. Orion connects over TDS (the SQL endpoint) using ODBC Driver 18 with Service Principal authentication, with no interactive login required. Azure App Registration- Create an App Registration in your Entra ID tenant (docs)
- Note the Application (client) ID and Directory (tenant) ID
- Create a Client Secret under Certificates & secrets (docs) and note the secret value (not the Secret ID). Recommended expiry: 12 months
- Navigate to Fabric Admin Portal → Tenant settings → Developer settings
- Enable Service principals can use Fabric APIs
- Scope to a security group containing the Orion Service Principal (recommended), or enable for the entire organization
xxxxxxxx.datawarehouse.fabric.microsoft.com. Note the Database name (the Warehouse name).
Credentials summary
SELECT only) to discover your schema via
INFORMATION_SCHEMA, run agent-generated queries, and stream results into its
analysis pipeline. It never executes DDL, DML, or stored procedures. If you
use dbt with Fabric, Orion can enrich metadata with dbt models and lineage;
see dbt.Delta Lake
Orion connects to Delta Lake tables on Azure Data Lake Storage Gen2 (abfss://) or Google Cloud Storage (gs://). Orion reads the Delta table directly via its transaction log. There is no warehouse, cluster, or notebook to provision.
You provide two things: a Table URI pointing at a Delta table folder (or a parent folder containing many Delta tables), and credentials with read access to that location.
- Azure Data Lake Storage Gen2
- Google Cloud Storage
- The Table URI looks like
abfss://<container>@<storage-account>.dfs.core.windows.net/<path> <path>can point to a single Delta table folder (containing a_delta_log/subdirectory) or a parent folder; in the parent case, Orion exposes every Delta table found underneath- Confirm hierarchical namespace is enabled on the storage account (required for
abfss://)
SAS token (preferred)
sp=rl), expiry 90 days
or longer. Send the token query string (with or without a leading ?).Account key
abfss://... string), storage account name (required for SAS tokens), and one of SAS token or account key.dbt
If you use dbt, Orion can enrich an existing warehouse connection with your dbt model descriptions and lineage. You connect Orion to your dbt project’s GitHub repository with a read-only fine-grained access token.Create a GitHub Personal Access Token
- Navigate to Settings → Developer Settings → Personal access tokens → Fine-grained tokens
- Click Generate new token
- Set your organization as the resource owner (if required)
- Configure permissions: Contents → Read access (Metadata is auto-added)
- Under Repository access, select Only select repositories and add your dbt project repo only
- Click Generate token, then copy and save it immediately; it won’t be shown again
Configure the Orion connection
- In Orion, go to Configuration → Data Sources
- Click the data source tile you want to enrich, then click Edit. (The same options appear when first adding a data source.)
- Check Add schema enrichment for enhanced metadata and select dbt project
- Set dbt Source Type to GitHub Repository
- Enter the Repository URL (your dbt project’s GitHub URL) and Personal Access Token
-
Click Save Changes
