Set up Snowflake for Workday Live Data Query¶
Note
Workday Live Data Query for Snowflake is in Early Adopter (EA) for Workday and in Preview for Snowflake. To request access, contact your Workday account representative.
This topic describes how to create the Snowflake objects needed to connect to the Workday Live Data Query (LDQ) service: a dedicated role and user, a database and schema, a stage to hold the Python connector, a network rule to allow outbound traffic to Workday, a secret to store your private key, and an external access integration to tie them together.
Complete these steps before creating a Snowflake Notebook. See About Workday Live Data Query for Snowflake for the full setup checklist.
Step 1: Download the Python connector¶
The Workday LDQ connector ships as a .whl (wheel) file. Download it from the Workday Community portal before starting the Snowflake setup so it’s available to upload in a later step.
- Sign in to Workday Community with your Workday credentials.
- Download the latest
.whlfile (for example,ldq_python_client-1.0.3-py3-none-any.whl) to your local computer. The download may be packaged as a zip file namedDatacloud-LiveDataQueryPython.zip. - If you downloaded a zip file, extract it to get the
.whlfile.
Note
You must have a valid Workday customer or partner account to access the download. If you can’t find the file, contact your Workday account representative.
Step 2: Create a role and user¶
Create a dedicated role and user for LDQ instead of using ACCOUNTADMIN. This role will have only the minimum privileges needed to create and manage the LDQ objects.
Note
This step requires ACCOUNTADMIN (or SECURITYADMIN + SYSADMIN). All subsequent steps use the new WORKDAY_LDQ_TEST_ROLE role.
You can complete this step using SQL or Snowsight.
Using SQL¶
In Snowsight, go to Projects > Worksheets, click + Worksheet, set your role to ACCOUNTADMIN, and run:
Note
Replace COMPUTE_WH with the name of the warehouse you plan to use. After the database and schema are created in the next step, WORKDAY_LDQ_TEST_ROLE automatically owns those objects and has full privileges on them.
Using Snowsight¶
- Navigate to Admin > Users & Roles > Roles.
- Click + Role, enter
WORKDAY_LDQ_TEST_ROLE, and click Create Role. - Navigate to Admin > Users & Roles > Users.
- Click + User, enter
WORKDAY_LDQ_TEST_USER, set the default role toWORKDAY_LDQ_TEST_ROLE, and click Create User. - Grant the role to the user and the account-level privileges as shown in the SQL above.
Important
Switch to WORKDAY_LDQ_TEST_ROLE for all remaining steps. You no longer need ACCOUNTADMIN.
Step 3: Create a database and schema¶
Create a dedicated database and schema to hold the LDQ stage, network rule, secret, and integration.
Using SQL¶
Open a Snowflake worksheet, set your role to WORKDAY_LDQ_TEST_ROLE, and run:
Using Snowsight¶
- Navigate to Catalog > Database Explorer.
- Click + Database, enter
WORKDAY_LDQ_TEST, and click Create. - Open the new database, click + Schema, enter
LIVEDATA, and click Create.
Step 4: Create a stage for the Python connector¶
Create a Snowflake internal stage to store the wheel file so it can be installed inside your notebook. Create the stage first, then upload the file you downloaded in Step 1.
Create the stage¶
- In Snowsight, navigate to Catalog > Database Explorer.
- Search for
WORKDAY_LDQ_TESTand click on it. - Click Schemas, then LIVEDATA, then Stages.
- Click + Stage > Snowflake Managed.
- Enter
LDQ_STAGEas the name, enable Directory table, and click Create.
Upload the wheel file¶
- Open the
LDQ_STAGEstage. - Click the Files tab, then + Files.
- Select the
.whlfile from your local computer. - Click Upload.
Step 5: Create a network rule¶
By default, Snowflake Notebooks can’t make outbound network calls. A network rule defines which external hosts are permitted. Create one that allows HTTPS traffic to your Workday host (for OAuth2 and the live data service) and to PyPI (so pip install can download the connector’s dependencies).
Using SQL¶
In the same worksheet (with WORKDAY_LDQ_TEST_ROLE), run:
Using Snowsight¶
- Navigate to Admin > Security > Network Rules.
- Click + Network Rule and fill in the following fields:
- Name:
WORKDAY_LDQ_TEST_RULE - Database / Schema:
WORKDAY_LDQ_TEST/LIVEDATA - Type: Host & Port
- Mode: Egress
- Hosts:
impl-services1.wd12.myworkday.com:443,pypi.org:443,files.pythonhosted.org:443
- Name:
- Click Create Network Rule.
Note
Replace impl-services1.wd12.myworkday.com with the host from your token endpoint URL. The same host serves both the data service and the token endpoint. The pypi.org and files.pythonhosted.org entries are required so that pip install can download the connector’s dependencies at notebook runtime.
Step 6: Store the private key as a Snowflake Secret¶
Store the RSA private key as a Snowflake Secret to prevent it from being hardcoded in notebooks or configuration files. The secret is encrypted at rest and only accessible to notebooks granted access through the external access integration in Step 7.
Using SQL¶
In the same worksheet, run:
Caution
Paste the PEM content directly into the SQL worksheet. Don’t save it to a file or share it in plain text. Once created, the secret value can’t be retrieved via SQL.
Using Snowsight¶
- Navigate to Admin > Security > Secrets.
- Click + Secret and fill in the following fields:
- Name:
WORKDAY_PRIVATE_KEY - Database / Schema:
WORKDAY_LDQ_TEST/LIVEDATA - Type: Generic String
- Secret value: paste the full contents of
private-key.pem, including the-----BEGIN-----and-----END-----lines
- Name:
- Click Create Secret.
Caution
The secret value is encrypted at rest and can’t be retrieved after creation through the UI or SQL.
Step 7: Create an external access integration¶
An External Access Integration (EAI) references the network rule and the private key secret, and acts as the Snowflake-level permission grant that allows a notebook to use both. You must attach the EAI to your notebook before any outbound calls to Workday succeed.
Note
Creating an external access integration requires the CREATE INTEGRATION privilege on the account, which was granted to WORKDAY_LDQ_TEST_ROLE in Step 2.
Using SQL¶
In the same worksheet, run:
Using Snowsight¶
- Navigate to Admin > Security > External Access Integrations.
- Click + External Access Integration and fill in the following fields:
- Name:
WORKDAY_LDQ_TEST_EAI - Allowed Network Rules: select
WORKDAY_LDQ_TEST.LIVEDATA.WORKDAY_LDQ_TEST_RULE - Allowed Authentication Secrets: select
WORKDAY_LDQ_TEST.LIVEDATA.WORKDAY_PRIVATE_KEY - Enabled: toggle on
- Name:
- Click Create External Access Integration.
Next steps¶
With the Snowflake setup complete, continue to Connect to Workday and query data from Snowflake to create a notebook, install the connector, and run your first queries.