public final class DataSources extends Object
DataSources.| Modifier and Type | Method and Description |
|---|---|
static DataSource |
createFromAzureBlobStorage(String dataSourceName,
String storageConnectionString,
String containerName)
Creates a new
DataSource to connect to an Azure Blob container. |
static DataSource |
createFromAzureBlobStorage(String dataSourceName,
String storageConnectionString,
String containerName,
String pathPrefix,
String description,
DataDeletionDetectionPolicy deletionDetectionPolicy)
Creates a new
DataSource to connect to an Azure Blob container. |
static DataSource |
createFromAzureSql(String dataSourceName,
String sqlConnectionString,
String tableOrViewName)
Creates a new
DataSource to connect to an Azure SQL database. |
static DataSource |
createFromAzureSql(String dataSourceName,
String sqlConnectionString,
String tableOrViewName,
String description,
DataChangeDetectionPolicy changeDetectionPolicy,
DataDeletionDetectionPolicy deletionDetectionPolicy)
Creates a new
DataSource to connect to an Azure SQL database. |
static DataSource |
createFromAzureTableStorage(String dataSourceName,
String storageConnectionString,
String tableName)
Creates a new
DataSource to connect to an Azure Table. |
static DataSource |
createFromAzureTableStorage(String dataSourceName,
String storageConnectionString,
String tableName,
String query,
String description,
DataDeletionDetectionPolicy deletionDetectionPolicy)
Creates a new
DataSource to connect to an Azure Table. |
static DataSource |
createFromCosmos(String dataSourceName,
String cosmosConnectionString,
String collectionName)
Creates a new
DataSource to connect to a Cosmos database with change detection set to true. |
static DataSource |
createFromCosmos(String dataSourceName,
String cosmosConnectionString,
String collectionName,
Boolean useChangeDetection)
Creates a new
DataSource to connect to a Cosmos database. |
static DataSource |
createFromCosmos(String dataSourceName,
String cosmosConnectionString,
String collectionName,
String query,
Boolean useChangeDetection,
String description,
DataDeletionDetectionPolicy deletionDetectionPolicy)
Creates a new
DataSource to connect to a Cosmos database. |
public static DataSource createFromAzureSql(String dataSourceName, String sqlConnectionString, String tableOrViewName, String description, DataChangeDetectionPolicy changeDetectionPolicy, DataDeletionDetectionPolicy deletionDetectionPolicy)
DataSource to connect to an Azure SQL database.dataSourceName - The name of the data source.sqlConnectionString - The connection string for the Azure SQL database.tableOrViewName - The name of the table or view from which to read rows.description - Optional. Description of the data source.changeDetectionPolicy - The change detection policy for the data source. Note that only high watermark
change detection is allowed for Azure SQL when deletion detection is enabled.deletionDetectionPolicy - Optional. The data deletion detection policy for the data source.DataSource instance.IllegalArgumentException - If dataSourceName, sqlConnectionString, or tableOrViewName is null or empty.public static DataSource createFromAzureSql(String dataSourceName, String sqlConnectionString, String tableOrViewName)
DataSource to connect to an Azure SQL database.dataSourceName - The name of the data source.sqlConnectionString - The connection string for the Azure SQL database.tableOrViewName - The name of the table or view from which to read rows.DataSource instance.IllegalArgumentException - If dataSourceName, sqlConnectionString, or tableOrViewName is null or empty.public static DataSource createFromAzureBlobStorage(String dataSourceName, String storageConnectionString, String containerName, String pathPrefix, String description, DataDeletionDetectionPolicy deletionDetectionPolicy)
DataSource to connect to an Azure Blob container.dataSourceName - The name of the data source.storageConnectionString - The connection string for the Azure Storage account. The Storage connection string
must use this format:
"DefaultEndpointsProtocol=https;AccountName=[your storage account];AccountKey=[your account key]:
Note: The connection string must use HTTPS.
containerName - The name of the container from which to read blobs.pathPrefix - Optional. Limits the data source to only include blobs starting with the specified prefix, this
is useful when blobs are organized into "virtual folders".description - Optional. Description of the data sourcedeletionDetectionPolicy - Optional. The data deletion detection policy for the data sourceDataSource instance.IllegalArgumentException - If dataSourceName, containerName or storageConnectionString is null or empty.public static DataSource createFromAzureBlobStorage(String dataSourceName, String storageConnectionString, String containerName)
DataSource to connect to an Azure Blob container.dataSourceName - The name of the data source.storageConnectionString - The connection string for the Azure Storage account. The Storage connection string
must use this format:
"DefaultEndpointsProtocol=https;AccountName=[your storage account];AccountKey=[your account key]:
Note: The connection string must use HTTPS.
containerName - The name of the container from which to read blobs.DataSource instance.IllegalArgumentException - If dataSourceName, containerName or storageConnectionString is null or empty.public static DataSource createFromAzureTableStorage(String dataSourceName, String storageConnectionString, String tableName, String query, String description, DataDeletionDetectionPolicy deletionDetectionPolicy)
DataSource to connect to an Azure Table.dataSourceName - The name of the data source.storageConnectionString - The connection string for the Azure Storage account. The Storage connection string
must use this format:
"DefaultEndpointsProtocol=https;AccountName=[your storage account];AccountKey=[your account key]:
Note: The connection string must use HTTPS.
tableName - The name of the Azure table from which to read rows.query - Optional. A query that is applied to the table when reading rows.description - Optional. Description of the data sourcedeletionDetectionPolicy - Optional. The data deletion detection policy for the data source.DataSource instance.IllegalArgumentException - If dataSourceName, tableName, or storageConnectionString
is null or empty.public static DataSource createFromAzureTableStorage(String dataSourceName, String storageConnectionString, String tableName)
DataSource to connect to an Azure Table.dataSourceName - The name of the data source.storageConnectionString - The connection string for the Azure Storage account. The Storage connection string
must use this format:
"DefaultEndpointsProtocol=https;AccountName=[your storage account];AccountKey=[your account key]:
Note: The connection string must use HTTPS.
tableName - The name of the Azure table from which to read rows.DataSource instance.IllegalArgumentException - If dataSourceName, tableName, or storageConnectionString
is null or empty.public static DataSource createFromCosmos(String dataSourceName, String cosmosConnectionString, String collectionName, String query, Boolean useChangeDetection, String description, DataDeletionDetectionPolicy deletionDetectionPolicy)
DataSource to connect to a Cosmos database.dataSourceName - The name of the data source.cosmosConnectionString - The connection string for the Cosmos database. It must follow this format:
AccountName|AccountEndpoint=[your account name or endpoint]; AccountKey=[your account key];Database=[your
database name]"
collectionName - The name of the collection from which to read documents.query - Optional. A query that is applied to the collection when reading documents.useChangeDetection - Optional. Indicates whether to use change detection when indexing. Default is true.description - Optional. Description of the data sourcedeletionDetectionPolicy - Optional. The data deletion detection policy for the data source.DataSource instance.IllegalArgumentException - If dataSourceName, collectionName, or cosmosConnectionString is null or empty.public static DataSource createFromCosmos(String dataSourceName, String cosmosConnectionString, String collectionName, Boolean useChangeDetection)
DataSource to connect to a Cosmos database.dataSourceName - The name of the data source.cosmosConnectionString - The connection string for the Cosmos database. It must follow this format:
AccountName|AccountEndpoint=[your account name or endpoint]; AccountKey=[your account key];Database=[your
database name]"
collectionName - The name of the collection from which to read documentsuseChangeDetection - Optional. Indicates whether to use change detection when indexing. Default is true.DataSource instance.IllegalArgumentException - If dataSourceName, collectionName, or cosmosConnectionString is null or empty.public static DataSource createFromCosmos(String dataSourceName, String cosmosConnectionString, String collectionName)
DataSource to connect to a Cosmos database with change detection set to true.dataSourceName - The name of the data source.cosmosConnectionString - The connection string for the Cosmos database. It must follow this format:
AccountName|AccountEndpoint=[your account name or endpoint]; AccountKey=[your account key];Database=[your
database name]"
collectionName - The name of the collection from which to read documentsDataSource instance.IllegalArgumentException - If dataSourceName, collectionName, or cosmosConnectionString is null or empty.Copyright © 2020 Microsoft Corporation. All rights reserved.