Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from datafactory#package-2018-06 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Aug 25, 2021
1 parent 96190dd commit 7be2f51
Show file tree
Hide file tree
Showing 91 changed files with 1,560 additions and 109 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.5 (Unreleased)
## 1.0.0-beta.5 (2021-08-25)

- Azure Resource Manager DataFactory client library for Java. This package contains Microsoft Azure SDK for DataFactory Management SDK. The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services. Package tag package-2018-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.4 (2021-08-16)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-datafactory</artifactId>
<version>1.0.0-beta.4</version>
<version>1.0.0-beta.5</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
831 changes: 778 additions & 53 deletions sdk/datafactory/azure-resourcemanager-datafactory/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.datafactory")
.append("/")
.append("1.0.0-beta.4");
.append("1.0.0-beta.5");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

/** Samples for ActivityRuns QueryByPipelineRun. */
public final class ActivityRunsQueryByPipelineRunSamples {
/*
* operationId: ActivityRuns_QueryByPipelineRun
* api-version: 2018-06-01
* x-ms-examples: ActivityRuns_QueryByPipelineRun
*/
/**
* Sample code: ActivityRuns_QueryByPipelineRun.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@

/** Samples for DataFlowDebugSession AddDataFlow. */
public final class DataFlowDebugSessionAddDataFlowSamples {
/*
* operationId: DataFlowDebugSession_AddDataFlow
* api-version: 2018-06-01
* x-ms-examples: DataFlowDebugSession_AddDataFlow
*/
/**
* Sample code: DataFlowDebugSession_AddDataFlow.
*
Expand Down Expand Up @@ -81,32 +86,11 @@ public static void dataFlowDebugSessionAddDataFlow(com.azure.resourcemanager.dat
.withAnnotations(Arrays.asList())
.withLocation(
new AzureBlobStorageLocation()
.withFileName(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize(
"\"Ansiencoding.csv\"",
Object.class,
SerializerEncoding.JSON))
.withContainer(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize(
"\"dataflow-sample-data\"",
Object.class,
SerializerEncoding.JSON)))
.withColumnDelimiter(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize("\",\"", Object.class, SerializerEncoding.JSON))
.withQuoteChar(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize("\"\\\"\"", Object.class, SerializerEncoding.JSON))
.withEscapeChar(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize("\"\\\\\"", Object.class, SerializerEncoding.JSON))
.withFileName("Ansiencoding.csv")
.withContainer("dataflow-sample-data"))
.withColumnDelimiter(",")
.withQuoteChar("\"")
.withEscapeChar("\\")
.withFirstRowAsHeader(true))))
.withLinkedServices(
Arrays
Expand All @@ -117,33 +101,30 @@ public static void dataFlowDebugSessionAddDataFlow(com.azure.resourcemanager.dat
new AzureBlobStorageLinkedService()
.withAnnotations(Arrays.asList())
.withConnectionString(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize(
"\"DefaultEndpointsProtocol=https;AccountName=<storageName>;EndpointSuffix=core.windows.net;\"",
Object.class,
SerializerEncoding.JSON))
"DefaultEndpointsProtocol=https;AccountName=<storageName>;EndpointSuffix=core.windows.net;")
.withEncryptedCredential("<credential>"))))
.withDebugSettings(
new DataFlowDebugPackageDebugSettings()
.withSourceSettings(
Arrays
.asList(
new DataFlowSourceSetting().withSourceName("source1").withRowLimit(1000),
new DataFlowSourceSetting().withSourceName("source2").withRowLimit(222)))
.withParameters(
mapOf(
"sourcePath",
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize("\"Toy\"", Object.class, SerializerEncoding.JSON)))
new DataFlowSourceSetting()
.withSourceName("source1")
.withRowLimit(1000)
.withAdditionalProperties(mapOf()),
new DataFlowSourceSetting()
.withSourceName("source2")
.withRowLimit(222)
.withAdditionalProperties(mapOf())))
.withParameters(mapOf("sourcePath", "Toy"))
.withDatasetParameters(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize(
"{\"Movies\":{\"path\":\"abc\"},\"Output\":{\"time\":\"def\"}}",
Object.class,
SerializerEncoding.JSON))),
SerializerEncoding.JSON)))
.withAdditionalProperties(mapOf()),
Context.NONE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
import com.azure.resourcemanager.datafactory.models.IntegrationRuntimeDataFlowProperties;
import com.azure.resourcemanager.datafactory.models.IntegrationRuntimeDebugResource;
import com.azure.resourcemanager.datafactory.models.ManagedIntegrationRuntime;
import java.util.HashMap;
import java.util.Map;

/** Samples for DataFlowDebugSession Create. */
public final class DataFlowDebugSessionCreateSamples {
/*
* operationId: DataFlowDebugSession_Create
* api-version: 2018-06-01
* x-ms-examples: DataFlowDebugSession_Create
*/
/**
* Sample code: DataFlowDebugSession_Create.
*
Expand All @@ -39,7 +46,20 @@ public static void dataFlowDebugSessionCreate(com.azure.resourcemanager.datafact
new IntegrationRuntimeDataFlowProperties()
.withComputeType(DataFlowComputeType.GENERAL)
.withCoreCount(48)
.withTimeToLive(10))))),
.withTimeToLive(10)
.withAdditionalProperties(mapOf()))
.withAdditionalProperties(mapOf())))),
Context.NONE);
}

@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

/** Samples for DataFlowDebugSession Delete. */
public final class DataFlowDebugSessionDeleteSamples {
/*
* operationId: DataFlowDebugSession_Delete
* api-version: 2018-06-01
* x-ms-examples: DataFlowDebugSession_Delete
*/
/**
* Sample code: DataFlowDebugSession_Delete.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

/** Samples for DataFlowDebugSession ExecuteCommand. */
public final class DataFlowDebugSessionExecuteCommandSamples {
/*
* operationId: DataFlowDebugSession_ExecuteCommand
* api-version: 2018-06-01
* x-ms-examples: DataFlowDebugSession_ExecuteCommand
*/
/**
* Sample code: DataFlowDebugSession_ExecuteCommand.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

/** Samples for DataFlowDebugSession QueryByFactory. */
public final class DataFlowDebugSessionQueryByFactorySamples {
/*
* operationId: DataFlowDebugSession_QueryByFactory
* api-version: 2018-06-01
* x-ms-examples: DataFlowDebugSession_QueryByFactory
*/
/**
* Sample code: DataFlowDebugSession_QueryByFactory.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,66 @@

/** Samples for DataFlows CreateOrUpdate. */
public final class DataFlowsCreateOrUpdateSamples {
/*
* operationId: DataFlows_CreateOrUpdate
* api-version: 2018-06-01
* x-ms-examples: DataFlows_Create
*/
/**
* Sample code: DataFlows_Create.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void dataFlowsCreate(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.dataFlows()
.define("exampleDataFlow")
.withExistingFactory("exampleResourceGroup", "exampleFactoryName")
.withProperties(
new MappingDataFlow()
.withDescription(
"Sample demo data flow to convert currencies showing usage of union, derive and conditional"
+ " split transformation.")
.withSources(
Arrays
.asList(
new DataFlowSource()
.withName("USDCurrency")
.withDataset(new DatasetReference().withReferenceName("CurrencyDatasetUSD")),
new DataFlowSource()
.withName("CADSource")
.withDataset(new DatasetReference().withReferenceName("CurrencyDatasetCAD"))))
.withSinks(
Arrays
.asList(
new DataFlowSink()
.withName("USDSink")
.withDataset(new DatasetReference().withReferenceName("USDOutput")),
new DataFlowSink()
.withName("CADSink")
.withDataset(new DatasetReference().withReferenceName("CADOutput"))))
.withScript(
"source(output(PreviousConversionRate as double,Country as string,DateTime1 as"
+ " string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false)"
+ " ~> USDCurrency\n"
+ "source(output(PreviousConversionRate as double,Country as string,DateTime1 as"
+ " string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false)"
+ " ~> CADSource\n"
+ "USDCurrency, CADSource union(byName: true)~> Union\n"
+ "Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~>"
+ " NewCurrencyColumn\n"
+ "NewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~>"
+ " ConditionalSplit1@(USD, CAD)\n"
+ "ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\n"
+ "ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink"))
.create();
}

/*
* operationId: DataFlows_CreateOrUpdate
* api-version: 2018-06-01
* x-ms-examples: DataFlows_Update
*/
/**
* Sample code: DataFlows_Update.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

/** Samples for DataFlows Delete. */
public final class DataFlowsDeleteSamples {
/*
* operationId: DataFlows_Delete
* api-version: 2018-06-01
* x-ms-examples: DataFlows_Delete
*/
/**
* Sample code: DataFlows_Delete.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

/** Samples for DataFlows Get. */
public final class DataFlowsGetSamples {
/*
* operationId: DataFlows_Get
* api-version: 2018-06-01
* x-ms-examples: DataFlows_Get
*/
/**
* Sample code: DataFlows_Get.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

/** Samples for DataFlows ListByFactory. */
public final class DataFlowsListByFactorySamples {
/*
* operationId: DataFlows_ListByFactory
* api-version: 2018-06-01
* x-ms-examples: DataFlows_ListByFactory
*/
/**
* Sample code: DataFlows_ListByFactory.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,54 @@

/** Samples for Datasets CreateOrUpdate. */
public final class DatasetsCreateOrUpdateSamples {
/*
* operationId: Datasets_CreateOrUpdate
* api-version: 2018-06-01
* x-ms-examples: Datasets_Create
*/
/**
* Sample code: Datasets_Create.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void datasetsCreate(com.azure.resourcemanager.datafactory.DataFactoryManager manager)
throws IOException {
manager
.datasets()
.define("exampleDataset")
.withExistingFactory("exampleResourceGroup", "exampleFactoryName")
.withProperties(
new AzureBlobDataset()
.withLinkedServiceName(new LinkedServiceReference().withReferenceName("exampleLinkedService"))
.withParameters(
mapOf(
"MyFileName",
new ParameterSpecification().withType(ParameterType.STRING),
"MyFolderPath",
new ParameterSpecification().withType(ParameterType.STRING)))
.withFolderPath(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize(
"{\"type\":\"Expression\",\"value\":\"@dataset().MyFolderPath\"}",
Object.class,
SerializerEncoding.JSON))
.withFileName(
SerializerFactory
.createDefaultManagementSerializerAdapter()
.deserialize(
"{\"type\":\"Expression\",\"value\":\"@dataset().MyFileName\"}",
Object.class,
SerializerEncoding.JSON))
.withFormat(new TextFormat()))
.create();
}

/*
* operationId: Datasets_CreateOrUpdate
* api-version: 2018-06-01
* x-ms-examples: Datasets_Update
*/
/**
* Sample code: Datasets_Update.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

/** Samples for Datasets Delete. */
public final class DatasetsDeleteSamples {
/*
* operationId: Datasets_Delete
* api-version: 2018-06-01
* x-ms-examples: Datasets_Delete
*/
/**
* Sample code: Datasets_Delete.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

/** Samples for Datasets Get. */
public final class DatasetsGetSamples {
/*
* operationId: Datasets_Get
* api-version: 2018-06-01
* x-ms-examples: Datasets_Get
*/
/**
* Sample code: Datasets_Get.
*
Expand Down
Loading

0 comments on commit 7be2f51

Please sign in to comment.