Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
APPLIES TO:
Azure Data Factory
Azure Synapse Analytics
Tip
Try out Data Factory in Microsoft Fabric, an all-in-one analytics solution for enterprises. Microsoft Fabric covers everything from data movement to data science, real-time analytics, business intelligence, and reporting. Learn how to start a new trial for free!
This article outlines how to use the Copy Activity in an Azure Data Factory or Synapse Analytics pipeline to copy data from Square. It builds on the copy activity overview article that presents a general overview of copy activity.
Important
This connector is currently in preview. You can try it out and give us feedback. If you want to take a dependency on preview connectors in your solution, please contact Azure support.
Important
The Square connector version 2.0 (Preview) provides improved native Square support. If you are using Square connector version 1.0 in your solution, please upgrade the Square connector before October 15, 2025. Refer to this section for details on the difference between version 2.0 (Preview) and version 1.0.
Supported capabilities
This Square connector is supported for the following capabilities:
Supported capabilities | IR |
---|---|
Copy activity (source/-) | ① ②(only for version 1.0) |
Lookup activity | ① ②(only for version 1.0) |
① Azure integration runtime ② Self-hosted integration runtime
For a list of data stores that are supported as sources/sinks, see the Supported data stores table.
The service provides a built-in driver to enable connectivity, therefore you don't need to manually install any driver using this connector.
The connector supports the Windows versions in this article.
Getting started
To perform the Copy activity with a pipeline, you can use one of the following tools or SDKs:
- The Copy Data tool
- The Azure portal
- The .NET SDK
- The Python SDK
- Azure PowerShell
- The REST API
- The Azure Resource Manager template
Create a linked service to Square using UI
Use the following steps to create a linked service to Square in the Azure portal UI.
Browse to the Manage tab in your Azure Data Factory or Synapse workspace and select Linked Services, then click New:
Search for Square and select the Square connector.
Configure the service details, test the connection, and create the new linked service.
Connector configuration details
The following sections provide details about properties that are used to define Data Factory entities specific to Square connector.
Linked service properties
The Square connector now supports version 2.0 (Preview). Refer to this section to upgrade your Square connector version from version 1.0. For the property details, see the corresponding sections.
Version 2.0 (Preview)
The Square linked service supports the following properties when apply version 2.0 (Preview):
Property | Description | Required |
---|---|---|
type | The type property must be set to: Square | Yes |
version | The version that you specify. The value is 2.0 . |
Yes |
host | The URL of the Square instance. (i.e. mystore.mysquare.com) | Yes |
clientId | The client ID associated with your Square application. | Yes |
clientSecret | The client secret associated with your Square application. Mark this field as a SecureString to store it securely, or reference a secret stored in Azure Key Vault. | Yes |
accessToken | The access token obtained from Square. Grants limited access to a Square account by asking an authenticated user for explicit permissions. OAuth access tokens expires 30 days after issued, but refresh tokens do not expire. Access tokens can be refreshed by refresh token. Mark this field as a SecureString to store it securely, or reference a secret stored in Azure Key Vault. For more information about access token types, see Access token types. |
Yes |
refreshToken | The refresh token obtained from Square. Used to obtain new access tokens when the current one expires. Mark this field as a SecureString to store it securelyFactory, or reference a secret stored in Azure Key Vault. |
No |
Example:
{
"name": "SquareLinkedService",
"properties": {
"type": "Square",
"version": "2.0",
"typeProperties": {
"host": "<e.g. mystore.mysquare.com>",
"clientId": "<client ID>",
"clientSecret": {
"type": "SecureString",
"value": "<clientSecret>"
},
"accessToken": {
"type": "SecureString",
"value": "<access token>"
},
"refreshToken": {
"type": "SecureString",
"value": "<refresh token>"
}
}
}
}
Version 1.0
The Square linked service supports the following properties when apply version 1.0:
Property | Description | Required |
---|---|---|
type | The type property must be set to: Square | Yes |
connectionProperties | A group of properties that defines how to connect to Square. | Yes |
Under connectionProperties : |
||
host | The URL of the Square instance. (i.e. mystore.mysquare.com) | Yes |
clientId | The client ID associated with your Square application. | Yes |
clientSecret | The client secret associated with your Square application. Mark this field as a SecureString to store it securely, or reference a secret stored in Azure Key Vault. | Yes |
accessToken | The access token obtained from Square. Grants limited access to a Square account by asking an authenticated user for explicit permissions. OAuth access tokens expires 30 days after issued, but refresh tokens do not expire. Access tokens can be refreshed by refresh token. Mark this field as a SecureString to store it securely, or reference a secret stored in Azure Key Vault. For more information about access token types, see Access token types. |
Yes |
refreshToken | The refresh token obtained from Square. Used to obtain new access tokens when the current one expires. Mark this field as a SecureString to store it securelyFactory, or reference a secret stored in Azure Key Vault. |
No |
useEncryptedEndpoints | Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. | No |
useHostVerification | Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over TLS. The default value is true. | No |
usePeerVerification | Specifies whether to verify the identity of the server when connecting over TLS. The default value is true. | No |
connectVia | The Integration Runtime to be used to connect to the data store. If not specified, it uses the default Azure Integration Runtime. | No |
Example:
{
"name": "SquareLinkedService",
"properties": {
"type": "Square",
"typeProperties": {
"connectionProperties": {
"host": "<e.g. mystore.mysquare.com>",
"clientId": "<client ID>",
"clientSecret": {
"type": "SecureString",
"value": "<clientSecret>"
},
"accessToken": {
"type": "SecureString",
"value": "<access token>"
},
"refreshToken": {
"type": "SecureString",
"value": "<refresh token>"
},
"useEncryptedEndpoints": true,
"useHostVerification": true,
"usePeerVerification": true
}
}
}
}
Access token types
Square support two types of access token: personal and OAuth.
Personal access tokens are used to get unlimited Connect API access to resources in your own Square account.
OAuth access tokens are used to get authenticated and scoped Connect API access to any Square account. Use them when your app accesses resources in other Square accounts on behalf of account owners. OAuth access tokens can also be used to access resources in your own Square account.
Important
To perform Test connection in the linked service,
MERCHANT_PROFILE_READ
is required to get a scoped OAuth access token. For permissions to access other tables, see Square OAuth Permissions Reference.
Authentication via personal access token only needs accessToken
, while authentication via OAuth requires accessToken
and refreshToken
. Learn how to retrieve access token from here.
Dataset properties
For a full list of sections and properties available for defining datasets, see the datasets article. This section provides a list of properties supported by Square dataset.
To copy data from Square, set the type property of the dataset to SquareObject. The following properties are supported:
Property | Description | Required |
---|---|---|
type | The type property of the dataset must be set to: SquareObject | Yes |
tableName | Name of the table. | Yes for version 2.0 (Preview). No for version 1.0 (if "query" in activity source is specified) |
Example
{
"name": "SquareDataset",
"properties": {
"type": "SquareObject",
"typeProperties": {},
"schema": [],
"linkedServiceName": {
"referenceName": "<Square linked service name>",
"type": "LinkedServiceReference"
}
}
}
Copy activity properties
For a full list of sections and properties available for defining activities, see the Pipelines article. This section provides a list of properties supported by Square source.
Square as source
To copy data from Square, set the source type in the copy activity to SquareSource. The following properties are supported in the copy activity source section:
Property | Description | Required |
---|---|---|
type | The type property of the copy activity source must be set to: SquareSource | Yes |
query | Use the custom SQL query to read data. For example: "SELECT * FROM Business" . |
No (if "tableName" in dataset is specified) |
Note
query
is not supported in version 2.0 (Preview).
Example:
"activities":[
{
"name": "CopyFromSquare",
"type": "Copy",
"inputs": [
{
"referenceName": "<Square input dataset name>",
"type": "DatasetReference"
}
],
"outputs": [
{
"referenceName": "<output dataset name>",
"type": "DatasetReference"
}
],
"typeProperties": {
"source": {
"type": "SquareSource",
"query": "SELECT * FROM Business"
},
"sink": {
"type": "<sink type>"
}
}
}
]
Data type mapping for Square
When you copy data from Square, the following mappings apply from Square's data types to the internal data types used by the service. To learn about how the copy activity maps the source schema and data type to the sink, see Schema and data type mappings.
Square data type | Interim service data type (for version 2.0 (Preview)) | Interim service data type (for version 1.0) |
---|---|---|
String | String | String |
Integer | Int32 | Int32 |
Long | Int64 | Int64 |
Boolean | Boolean | Boolean |
Date | String | Not supported. |
Timestamp | String | Not supported. |
Timestamp with offset | String | Not supported. |
Duration (full) | String | String |
Duration (time only) | String | String |
Money | Int64 | Int64 |
Lookup activity properties
To learn details about the properties, check Lookup activity.
Square connector lifecycle and upgrade
The following table shows the release stage and change logs for different versions of the Square connector:
Version | Release stage | Change log |
---|---|---|
Version 1.0 | End of support announced | / |
Version 2.0 | Public Preview | • Date, Timestamp and Timestamp with offset are read as String data type. • useEncryptedEndpoints , useHostVerification , usePeerVerification are not supported in the linked service. • Self-hosted integration runtime is not supported. • query is not supported. |
Upgrade the Square connector from version 1.0 to version 2.0 (Preview)
- In Edit linked service page, select 2.0 (Preview) for version. For more information, see linked service version 2.0 (Preview) properties.
- The data type mapping for the Square linked service version 2.0 is different from that for the version 1.0. To learn the latest data type mapping, see Data type mapping for Square.
- Self-hosted integration runtime is only supported in version 1.0. You should use the Azure integration runtime instead of self-hosted integration runtime in version 2.0 (Preview).
query
is only supported in version 1.0. You should use thetableName
instead ofquery
in version 2.0 (Preview).
Related content
For a list of data stores supported as sources and sinks by the copy activity, see supported data stores.