public void CreateDataFlow()
 {
     #region Snippet:CreateDataFlow
     DataFlowCreateOrUpdateDataFlowOperation operation = DataFlowClient.StartCreateOrUpdateDataFlow("MyDataFlow", new DataFlowResource(new DataFlow()));
     DataFlowResource dataFlow = operation.WaitForCompletionAsync().ConfigureAwait(true).GetAwaiter().GetResult();
     #endregion
 }
Beispiel #2
0
        public DataFlowResource CreateOrUpdateDataFlow(string dataFlowName, string rawJsonContent)
        {
            DataFlowResource dataFlow = JsonConvert.DeserializeObject <DataFlowResource>(rawJsonContent);
            var operation             = _dataFlowClient.StartCreateOrUpdateDataFlow(dataFlowName, dataFlow);

            return(operation.Poll().Value);
        }
Beispiel #3
0
        public async Task DataFlowSample()
        {
            #region Snippet:CreateDataFlowClient
            // Replace the string below with your actual endpoint url.
            string endpoint = "<my-endpoint-url>";
            /*@@*/ endpoint = TestEnvironment.EndpointUrl;
            DataFlowClient client = new DataFlowClient(endpoint: new Uri(endpoint), credential: new DefaultAzureCredential());
            #endregion

            #region Snippet:CreateDataFlow
            DataFlowCreateOrUpdateDataFlowOperation operation       = client.StartCreateOrUpdateDataFlow("MyDataFlow", new DataFlowResource(new DataFlow()));
            Response <DataFlowResource>             createdDataflow = await operation.WaitForCompletionAsync();

            #endregion

            #region Snippet:RetrieveDataFlow
            DataFlowResource retrievedDataflow = client.GetDataFlow("MyDataFlow");
            #endregion

            #region Snippet:ListDataFlows
            Pageable <DataFlowResource> dataFlows = client.GetDataFlowsByWorkspace();
            foreach (DataFlowResource dataflow in dataFlows)
            {
                System.Console.WriteLine(dataflow.Name);
            }
            #endregion

            #region Snippet:DeleteDataFlow
            client.StartDeleteDataFlow("MyDataFlow");
            #endregion
        }
        public DataFlowResource CreateOrUpdateDataFlow(string dataFlowName, string rawJsonContent)
        {
            PSDataFlowResource pSDatasetResource = JsonConvert.DeserializeObject <PSDataFlowResource>(rawJsonContent, Settings);
            DataFlowResource   dataFlow          = pSDatasetResource.ToSdkObject();
            var operation = _dataFlowClient.StartCreateOrUpdateDataFlow(dataFlowName, dataFlow);

            return(operation.Poll().Value);
        }