Ready to get started?

Learn more about CData Connect Cloud or sign up for free trial access:

Free Trial

Model Paylocity Data Using Azure Analysis Services



Leverage CData Connect Cloud to establish a connection between Azure Analysis Services and Paylocity, enabling the direct import of real-time Paylocity data.

Microsoft Azure Analysis Services (AAS) is a fully-managed platform-as-a-service (PaaS) offering that delivers enterprise-grade data models in the cloud. When combined with CData Connect Cloud, AAS facilitates immediate cloud-to-cloud access to Paylocity data for applications. This article outlines the process of connecting to Paylocity via Connect Cloud and importing Paylocity data into Visual Studio using an AAS extension.

CData Connect Cloud offers a seamless cloud-to-cloud interface tailored for Paylocity, enabling you to create live models of Paylocity data in Azure Analysis Services without the need to replicate data to a natively supported database. While constructing high-quality semantic data models for business reports and client applications, Azure Analysis Services formulates SQL queries to retrieve data. CData Connect Cloud is equipped with optimized data processing capabilities right from the start, directing all supported SQL operations, including filters and JOINs, directly to Paylocity. This leverages server-side processing for swift retrieval of the requested Paylocity data.

Prerequisites

Before you connect, you must first do the following:

  • Connect a data source to your CData Connect Cloud account. Detailed steps are provided in the next section.
  • Generate a Personal Access Token (PAT). Copy this down, as it acts as your password during authentication.
  • Create a server in Azure Analysis Services to which you will deploy your data from CData Connect Cloud.
  • Install and configure an On-Premise Gateway in your system. This will pull data from the source via CData Connect Cloud into the Azure Analysis Services project and deploy models to the server. Refer to the given link to find the detailed process.

Configure Paylocity Connectivity for AAS

Connectivity to Paylocity from Azure Analysis Services is made possible through CData Connect Cloud. To work with Paylocity data from Azure Analysis Services, we start by creating and configuring a Paylocity connection.

  1. Log into Connect Cloud, click Connections and click Add Connection
  2. Select "Paylocity" from the Add Connection panel
  3. Enter the necessary authentication properties to connect to Paylocity.

    Set the following to establish a connection to Paylocity:

    • RSAPublicKey: Set this to the RSA Key associated with your Paylocity, if the RSA Encryption is enabled in the Paylocity account.

      This property is required for executing Insert and Update statements, and it is not required if the feature is disabled.

    • UseSandbox: Set to true if you are using sandbox account.
    • CustomFieldsCategory: Set this to the Customfields category. This is required when IncludeCustomFields is set to true. The default value for this property is PayrollAndHR.
    • Key: The AES symmetric key(base 64 encoded) encrypted with the Paylocity Public Key. It is the key used to encrypt the content.

      Paylocity will decrypt the AES key using RSA decryption.
      It is an optional property if the IV value not provided, The driver will generate a key internally.

    • IV: The AES IV (base 64 encoded) used when encrypting the content. It is an optional property if the Key value not provided, The driver will generate an IV internally.

    Connect Using OAuth Authentication

    You must use OAuth to authenticate with Paylocity. OAuth requires the authenticating user to interact with Paylocity using the browser. For more information, refer to the OAuth section in the Help documentation.

    The Pay Entry API

    The Pay Entry API is completely separate from the rest of the Paylocity API. It uses a separate Client ID and Secret, and must be explicitly requested from Paylocity for access to be granted for an account. The Pay Entry API allows you to automatically submit payroll information for individual employees, and little else. Due to the extremely limited nature of what is offered by the Pay Entry API, we have elected not to give it a separate schema, but it may be enabled via the UsePayEntryAPI connection property.

    Please be aware that when setting UsePayEntryAPI to true, you may only use the CreatePayEntryImportBatch & MergePayEntryImportBatchgtable stored procedures, the InputTimeEntry table, and the OAuth stored procedures. Attempts to use other features of the product will result in an error. You must also store your OAuthAccessToken separately, which often means setting a different OAuthSettingsLocation when using this connection property.

  4. Click Create & Test
  5. Navigate to the Permissions tab in the Add Paylocity Connection page and update the User-based permissions.

Add a Personal Access Token

If you are connecting from a service, application, platform, or framework that lacks support for OAuth authentication, you have the option to generate a Personal Access Token (PAT) for authentication purposes. It's advisable to follow best practices by creating a distinct PAT for each service to uphold access granularity.

  1. Click on your username at the top right of the Connect Cloud app and click User Profile.
  2. On the User Profile page, scroll down to the Personal Access Tokens section and click Create PAT.
  3. Give your PAT a name and click Create.
  4. The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.

With the connection configured, you are ready to connect to Paylocity data from Visual Studio using Azure Analysis Services.

Connect to Paylocity in Visual Studio Using AAS

The steps below outline connecting to CData Connect Cloud from Azure Analysis Services to create a new Paylocity data source. You will need the Microsoft Analysis Services Project extension installed in Microsoft Visual Studio to continue.

  1. In Visual Studio, create a new project. Select Analysis Services Tabular Project. Click on Next.
  2. In the Configure your new project dialog box, enter a name for your project in the Project name field. Fill in the rest of the fields.
  3. Click on Create. The Tabular model designer dialog box opens. Select Workspace server and enter the address of your Azure Analysis Services server (for example, asazure://eastus.azure.windows.net/myAzureServer). Also, make sure to select the option SQL Server 2022 / Azure Analysis Services (1600) from the Compatibility level dropdown. Click on Test Connection to check if the connection details are correct. Click OK and sign in to your server.
  4. Now, click on OK to create the project. Your Visual Studio window should resemble the following screenshot:
  5. In the Tabular Model Explorer window of Visual Studio, right-click Data Sources and select Import From Data Source.
  6. In the Get Data window, select SQL Server database and click Connect. In the Server field, enter the Virtual SQL Server endpoint and the port separated by a comma: e.g., “tds.cdata.com, 14333”, and click on OK.
  7. Click on Database and enter the following information:
    • User name: Enter your CData Connect Cloud username. This is displayed in the top-right corner of the CData Connect Cloud interface. For example, test@cdata.com.
    • Password: Enter the PAT you generated on the Settings page.

    Click on Connect. If successful, the Navigator window will pop up.

  8. In the Navigator window, search and select the tables of your choice
  9. You should now see the Salesforce table populated with data in the preview section on the right panel.
  10. Click on Load to import the data.

Now that you have imported the Paylocity data into your data model, you are ready to deploy the project to Azure Analysis Services for use in business reports, client applications, and more.

Get CData Connect Cloud

To get live data access to 100+ SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect Cloud today!