Only organizations with Phrase Data in their subscription will be able to use this feature.
Use cases
-
Query Phrase Data for Phrase TMS projects or jobs that satisfy certain conditions to facilitate sampling workflows or finding jobs that may need a special nudge.
-
Trigger statistics based actions, e.g. when enough words are translated to a certain target language.
Pre-requisites
To enable Phrase Orchestrator to connect securely to Phrase Data, follow these steps:
-
Locate the Phrase Data account identifier.
The Snowflake account identifier is used to configure the integration in Orchestrator. It can be found in the web UI when logging in to the Phrase Data instance.
-
Sign in to Phrase Data
-
Look at the URL in the browser and is should have this format:
https://<account_identifier>.snowflakecomputing.comExample:
If the URL is
https://mz18723.eu-west-1.snowflakecomputing.com, the account identifier is mz18723.eu-west-1. -
Copy the account identifier for later configuration with the Phrase Data integration in Phrase Orchestrator.
-
-
Generate an RSA key pair.
A private/public key pair is required to authenticate with Phrase Data.
-
On the workstation or server, run the following commands:
# Generate private key (unencrypted, recommended for compatibility) openssl genrsa -out rsa_key.p8 2048 # Generate the corresponding public key openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
-
The private key (
rsa_key.p8) should remain securely stored on your side and never shared. -
The public key (
rsa_key.pub) should be shared with Phrase. Keep this noted for later use.The public key is a text file that should look similar to this example:
-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwW2GmHZJ0m6aZq1v8fFz4SKjWl4TjA9mfx0MIfLtj4D4xBLv9jD1Iu3hT7sKn4D3gEVQPoB6MtiEhpx7F7QhvO7FQ8q2rJt3xEwVZ2Kohmz6FZ7P/0dYbGqAfd7nPtum6GLeA+E+Tf9X91GnGl6xKp0MeDqB4oZn3mC8Xt9jR0A9TmFfqpy1mJQFzF0oKhRUgD9lY7sLX6XU0otf6jNerOnqM6JtWvA5Bp2q5nfh7VfJjKZ5Zm7YnxGRF9NfXqJx6woL7JBoqLZTz4TRl7pCoj5bnLWJah8UhwB6vD3mW+OsoSgj6H1L5PRwP0hNsy7m4d9JZ+Y8rYFRmgSGxjM40QIDAQAB-----END PUBLIC KEY-----
-
-
Share the public key with Phrase.
-
Send the public key file (
rsa_key.pub) to Phrase securely (do not send the private key) via email or a dedicated Slack channel.Send an email address where Phrase can send the name of the service user after it is set it up.
Contact Technical Support or your Solutions Architects for further details on contact addresses.
-
Phrase will register the public key in Phrase Data for the dedicated service user. An email is sent out to the provided address which will contain a dedicated username.
-
Phrase will activate the access to the integration in Phrase Orchestrator.
-
To set up the integration, follow these steps:
-
Click from the navigation sidebar.
The page opens.
-
Click Add Integration.
The window is displayed.
-
Click Phrase Data.
The account window is displayed.
-
Provide:
-
Use the account identifier from step 1 in the pre-requisites section
-
Use the Phrase Data username from step 3 in the pre-requisites section
-
Use the content of the private key from step 2 in the pre-requisites section
-
-
Click Save.
The new integration is displayed on the page.
To query Phrase Data from a Phrase Orchestrator workflow, follow these steps:
-
From the tab of a workflow page, enter Send HTTP Request in the search field.
Rename it to Execute SQL Statement or similar.
-
Click on the action tile in the workflow and select Edit parameters from the tab on the right side.
-
Input these values:
-
URL:
https://<account ID>.snowflakecomputing.com/api/v2/statements -
Action:
POST
-
Data:
{ "statement": "<SQL statement>", "warehouse": "MEMSOURCE" }The name of the warehouse is not the same for all instances. In more recent setups it is named
PHRASE.Alter the <SQL statement> variable to a meaningful query. For example:
{ "statement": "SELECT TOP 10 * FROM memsource.org_154.BUYER_V2", "warehouse": "MEMSOURCE" }The name of the database is not the same for all instances. To reference the tables in the FROM clause, use the correct database name (more recent customers have it named PHRASE), and provide the correct schema name in the format of
org_<number>. -
Header:
Name:
AuthorizationValue:
Bearer {{ @var.snowflake_token }}Use to retrieve the value.
-
-
Click Save parameters to confirm the settings.