{
	"ProcessTemplates": [
		{
			"Name": "CSV files to Snowflake table",
			"Modified": "2024-07-04T11:08:15.7372111",
			"Modifier": "sampo.sarlin@frends.com",
			"Tags": [
				"CSV",
				"Snowflake"
			],
			"TemplateProcessTags": [],
			"Description": "This template will upload local CSV files to Snowflake table stage. Then the file content is inserted to the Snowflake table.",
			"Version": 1,
			"UniqueIdentifier": "bec46281-cac4-455c-a12e-9d2bab65d076",
			"ProcessVariablesJson": "{\"InFilePath\":{\"Value\":\"\\\"/path/\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The path to the local folder containing the CSV file(s).\"},\"SnowflakeTable\":{\"Value\":\"\\\"exampletable\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The Snowflake table where the CSV file(s) content is inserted.\"},\"SnowflakeConnectionString\":{\"Value\":\"\\\"host=myorganization-myaccount.snowflakecomputing.com;account=myaccount;user=myusername;password=mypassword;warehouse=mywh;role=myrole;db=mydb;schema=myschema;\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The connection string required to access the table.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "CSV files to Snowflake table",
					"Modified": "2024-07-04T11:08:15.7372111",
					"Modifier": "sampo.sarlin@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This template will upload local CSV files to Snowflake table stage. Then the file content is inserted to the Snowflake table.",
					"Version": 1,
					"UniqueIdentifier": "f23d21f1-358e-45a7-b31b-aa9c12e94291",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual\"><bpmn2:outgoing>Flow_0qnfaca</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_192w0n4\" name=\"Find CSV files in a local folder\"><bpmn2:incoming>Flow_0qnfaca</bpmn2:incoming><bpmn2:outgoing>Flow_0ennvy8</bpmn2:outgoing><bpmn2:property id=\"Property_1lnprck\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_129jvtw\"><bpmn2:sourceRef>DataObjectReference_1pzs8lr</bpmn2:sourceRef><bpmn2:targetRef>Property_1lnprck</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0qnfaca\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_192w0n4\" /><bpmn2:subProcess id=\"Activity_07gwyrv\" name=\"For each file\"><bpmn2:incoming>Flow_0v6dy3k</bpmn2:incoming><bpmn2:outgoing>Flow_1cqqsc9</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_09j4j3x\"><bpmn2:outgoing>Flow_1s2qw7h</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_0oszdaz\" name=\"Upload file to Snowflake table stage\"><bpmn2:incoming>Flow_1s2qw7h</bpmn2:incoming><bpmn2:outgoing>Flow_1ssejwp</bpmn2:outgoing></bpmn2:task><bpmn2:exclusiveGateway id=\"Gateway_0mkgn3k\" name=\"Table stage upload successful?\" default=\"Flow_10igl2p\"><bpmn2:incoming>Flow_1ssejwp</bpmn2:incoming><bpmn2:outgoing>Flow_10igl2p</bpmn2:outgoing><bpmn2:outgoing>Flow_09vx9gp</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1ssejwp\" sourceRef=\"Activity_0oszdaz\" targetRef=\"Gateway_0mkgn3k\" /><bpmn2:endEvent id=\"Event_1ey457z\"><bpmn2:incoming>Flow_0rbsvru</bpmn2:incoming></bpmn2:endEvent><bpmn2:endEvent id=\"Event_197w5tn\" name=\"Add error to exceptions variable and take the next file\"><bpmn2:incoming>Flow_10igl2p</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_10igl2p\" name=\"no\" sourceRef=\"Gateway_0mkgn3k\" targetRef=\"Event_197w5tn\" /><bpmn2:sequenceFlow id=\"Flow_09vx9gp\" name=\"yes\" sourceRef=\"Gateway_0mkgn3k\" targetRef=\"Activity_0jl4a8l\" /><bpmn2:task id=\"Activity_0jl4a8l\" name=\"Upload file data to Snowflake table\"><bpmn2:incoming>Flow_09vx9gp</bpmn2:incoming><bpmn2:outgoing>Flow_0st2wth</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0st2wth\" sourceRef=\"Activity_0jl4a8l\" targetRef=\"Gateway_1n6pl9h\" /><bpmn2:exclusiveGateway id=\"Gateway_1n6pl9h\" name=\"Table upload successful?\" default=\"Flow_1bskae5\"><bpmn2:incoming>Flow_0st2wth</bpmn2:incoming><bpmn2:outgoing>Flow_0rbsvru</bpmn2:outgoing><bpmn2:outgoing>Flow_1bskae5</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_0rbsvru\" name=\"yes\" sourceRef=\"Gateway_1n6pl9h\" targetRef=\"Event_1ey457z\" /><bpmn2:endEvent id=\"Event_1nzzhcd\" name=\"Add error to exceptions variable and take the next file\"><bpmn2:incoming>Flow_1bskae5</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1bskae5\" name=\"no\" sourceRef=\"Gateway_1n6pl9h\" targetRef=\"Event_1nzzhcd\" /><bpmn2:sequenceFlow id=\"Flow_1s2qw7h\" sourceRef=\"Event_09j4j3x\" targetRef=\"Activity_0oszdaz\" /><bpmn2:textAnnotation id=\"TextAnnotation_0h12k0t\"><bpmn2:text>Staged files are deleted after they are successfully uploaded to the table.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_0dhazy1\" sourceRef=\"Activity_0jl4a8l\" targetRef=\"TextAnnotation_0h12k0t\" /></bpmn2:subProcess><bpmn2:sequenceFlow id=\"Flow_0ennvy8\" sourceRef=\"Activity_192w0n4\" targetRef=\"Gateway_1i1x93w\" /><bpmn2:endEvent id=\"Event_0tsae29\"><bpmn2:incoming>Flow_1cqqsc9</bpmn2:incoming></bpmn2:endEvent><bpmn2:scriptTask id=\"Activity_0gb465a\" name=\"Initialize exceptions\"><bpmn2:incoming>Flow_05ai6ux</bpmn2:incoming><bpmn2:outgoing>Flow_0mngs19</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0mngs19\" sourceRef=\"Activity_0gb465a\" targetRef=\"Activity_1726apq\" /><bpmn2:scriptTask id=\"Activity_1726apq\" name=\"Initialize uploads\"><bpmn2:incoming>Flow_0mngs19</bpmn2:incoming><bpmn2:outgoing>Flow_0v6dy3k</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0v6dy3k\" sourceRef=\"Activity_1726apq\" targetRef=\"Activity_07gwyrv\" /><bpmn2:exclusiveGateway id=\"Gateway_1i1x93w\" name=\"Files found?\" default=\"Flow_1gs7b40\"><bpmn2:incoming>Flow_0ennvy8</bpmn2:incoming><bpmn2:outgoing>Flow_05ai6ux</bpmn2:outgoing><bpmn2:outgoing>Flow_1gs7b40</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_05ai6ux\" name=\"yes\" sourceRef=\"Gateway_1i1x93w\" targetRef=\"Activity_0gb465a\" /><bpmn2:intermediateThrowEvent id=\"Event_14dmc9r\" name=\"Throw an error if files were not found\"><bpmn2:incoming>Flow_1gs7b40</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_1gs7b40\" name=\"no\" sourceRef=\"Gateway_1i1x93w\" targetRef=\"Event_14dmc9r\" /><bpmn2:sequenceFlow id=\"Flow_1cqqsc9\" sourceRef=\"Activity_07gwyrv\" targetRef=\"Event_0tsae29\" /><bpmn2:dataObjectReference id=\"DataObjectReference_1pzs8lr\" name=\"Local fileshare\" dataObjectRef=\"DataObject_0wu26sq\" /><bpmn2:dataObject id=\"DataObject_0wu26sq\" /><bpmn2:textAnnotation id=\"TextAnnotation_1fio4rg\"><bpmn2:text>Variables for exceptions and uploads are initialized to provide information about the process.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_1chbh2q\" sourceRef=\"Activity_0gb465a\" targetRef=\"TextAnnotation_1fio4rg\" /><bpmn2:association id=\"Association_1ypox6f\" sourceRef=\"Activity_1726apq\" targetRef=\"TextAnnotation_1fio4rg\" /><bpmn2:group id=\"Group_00vcyja\" categoryValueRef=\"CategoryValue_1nd7c6l\" /><bpmn2:group id=\"Group_0cl7brk\" categoryValueRef=\"CategoryValue_0caefks\" /></bpmn2:process><bpmn2:category id=\"Category_1y5k7rr\"><bpmn2:categoryValue id=\"CategoryValue_1nd7c6l\" value=\"Locating the files in local fileshare\" /></bpmn2:category><bpmn2:category id=\"Category_1c84goa\"><bpmn2:categoryValue id=\"CategoryValue_0caefks\" value=\"Upload the CSV files for staging and table\" /></bpmn2:category><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"372\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"372\" y=\"276\" width=\"37\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_192w0n4_di\" bpmnElement=\"Activity_192w0n4\"><dc:Bounds x=\"520\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_07gwyrv_di\" bpmnElement=\"Activity_07gwyrv\" isExpanded=\"true\"><dc:Bounds x=\"1070\" y=\"90\" width=\"770\" height=\"390\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_09j4j3x_di\" bpmnElement=\"Event_09j4j3x\"><dc:Bounds x=\"1110\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0oszdaz_di\" bpmnElement=\"Activity_0oszdaz\"><dc:Bounds x=\"1210\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0mkgn3k_di\" bpmnElement=\"Gateway_0mkgn3k\" isMarkerVisible=\"true\"><dc:Bounds x=\"1365\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1362\" y=\"190\" width=\"58\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1ey457z_di\" bpmnElement=\"Event_1ey457z\"><dc:Bounds x=\"1772\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_197w5tn_di\" bpmnElement=\"Event_197w5tn\"><dc:Bounds x=\"1372\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1349\" y=\"395\" width=\"83\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0jl4a8l_di\" bpmnElement=\"Activity_0jl4a8l\"><dc:Bounds x=\"1490\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1n6pl9h_di\" bpmnElement=\"Gateway_1n6pl9h\" isMarkerVisible=\"true\"><dc:Bounds x=\"1655\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1649\" y=\"196\" width=\"62\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1nzzhcd_di\" bpmnElement=\"Event_1nzzhcd\"><dc:Bounds x=\"1662\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1639\" y=\"395\" width=\"83\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_0h12k0t_di\" bpmnElement=\"TextAnnotation_0h12k0t\"><dc:Bounds x=\"1490\" y=\"125\" width=\"129.99636627906978\" height=\"69.76744186046513\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_1ssejwp_di\" bpmnElement=\"Flow_1ssejwp\"><di:waypoint x=\"1310\" y=\"258\" /><di:waypoint x=\"1365\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_10igl2p_di\" bpmnElement=\"Flow_10igl2p\"><di:waypoint x=\"1390\" y=\"283\" /><di:waypoint x=\"1390\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1399\" y=\"314\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_09vx9gp_di\" bpmnElement=\"Flow_09vx9gp\"><di:waypoint x=\"1415\" y=\"258\" /><di:waypoint x=\"1490\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1441\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0st2wth_di\" bpmnElement=\"Flow_0st2wth\"><di:waypoint x=\"1590\" y=\"258\" /><di:waypoint x=\"1655\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0rbsvru_di\" bpmnElement=\"Flow_0rbsvru\"><di:waypoint x=\"1705\" y=\"258\" /><di:waypoint x=\"1772\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1731\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1bskae5_di\" bpmnElement=\"Flow_1bskae5\"><di:waypoint x=\"1680\" y=\"283\" /><di:waypoint x=\"1680\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1689\" y=\"315\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1s2qw7h_di\" bpmnElement=\"Flow_1s2qw7h\"><di:waypoint x=\"1146\" y=\"258\" /><di:waypoint x=\"1210\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_0dhazy1_di\" bpmnElement=\"Association_0dhazy1\"><di:waypoint x=\"1540\" y=\"218\" /><di:waypoint x=\"1540\" y=\"195\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Event_0tsae29_di\" bpmnElement=\"Event_0tsae29\"><dc:Bounds x=\"1942\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0gb465a_di\" bpmnElement=\"Activity_0gb465a\"><dc:Bounds x=\"785\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1726apq_di\" bpmnElement=\"Activity_1726apq\"><dc:Bounds x=\"875\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1i1x93w_di\" bpmnElement=\"Gateway_1i1x93w\" isMarkerVisible=\"true\"><dc:Bounds x=\"675\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"670\" y=\"209\" width=\"60\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_14dmc9r_di\" bpmnElement=\"Event_14dmc9r\"><dc:Bounds x=\"682\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"660\" y=\"395\" width=\"81\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_1pzs8lr_di\" bpmnElement=\"DataObjectReference_1pzs8lr\"><dc:Bounds x=\"552\" y=\"115\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"535\" y=\"85\" width=\"71\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_1fio4rg_di\" bpmnElement=\"TextAnnotation_1fio4rg\"><dc:Bounds x=\"770\" y=\"100\" width=\"180\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_00vcyja_di\" bpmnElement=\"Group_00vcyja\"><dc:Bounds x=\"450\" y=\"20\" width=\"520\" height=\"520\" /><bpmndi:BPMNLabel><dc:Bounds x=\"668\" y=\"27\" width=\"84\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_0cl7brk_di\" bpmnElement=\"Group_0cl7brk\"><dc:Bounds x=\"1000\" y=\"20\" width=\"890\" height=\"520\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1405\" y=\"27\" width=\"80\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"DataInputAssociation_129jvtw_di\" bpmnElement=\"DataInputAssociation_129jvtw\"><di:waypoint x=\"570\" y=\"165\" /><di:waypoint x=\"570\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0qnfaca_di\" bpmnElement=\"Flow_0qnfaca\"><di:waypoint x=\"408\" y=\"258\" /><di:waypoint x=\"520\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0ennvy8_di\" bpmnElement=\"Flow_0ennvy8\"><di:waypoint x=\"620\" y=\"258\" /><di:waypoint x=\"675\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0mngs19_di\" bpmnElement=\"Flow_0mngs19\"><di:waypoint x=\"815\" y=\"258\" /><di:waypoint x=\"875\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0v6dy3k_di\" bpmnElement=\"Flow_0v6dy3k\"><di:waypoint x=\"905\" y=\"258\" /><di:waypoint x=\"1070\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_05ai6ux_di\" bpmnElement=\"Flow_05ai6ux\"><di:waypoint x=\"725\" y=\"258\" /><di:waypoint x=\"785\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"740.9999999999998\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1gs7b40_di\" bpmnElement=\"Flow_1gs7b40\"><di:waypoint x=\"700\" y=\"283\" /><di:waypoint x=\"700\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"709\" y=\"315\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1cqqsc9_di\" bpmnElement=\"Flow_1cqqsc9\"><di:waypoint x=\"1840\" y=\"258\" /><di:waypoint x=\"1942\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_1chbh2q_di\" bpmnElement=\"Association_1chbh2q\"><di:waypoint x=\"802\" y=\"243\" /><di:waypoint x=\"811\" y=\"180\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_1ypox6f_di\" bpmnElement=\"Association_1ypox6f\"><di:waypoint x=\"886\" y=\"243\" /><di:waypoint x=\"870\" y=\"180\" /></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_192w0n4\",\"Type\":1,\"Parameters\":{\"input\":{\"Directory\":{\"mode\":\"csharp\",\"value\":\"#var.InFilePath\"},\"Pattern\":{\"mode\":\"text\",\"value\":\"*.csv\"}},\"options\":{\"UseGivenUserCredentialsForRemoteConnections\":{\"mode\":\"toggle\",\"value\":false},\"UserName\":{\"mode\":\"text\",\"value\":\"domain\\\\username\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"}}},\"SelectedTypeId\":\"/ProcessTask/f74a6e79-5336-4875-a109-507f9e4baa2e/v1\",\"PromoteResultAs\":null,\"Name\":\"Find CSV files in a local folder\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":false,\"ShouldDispose\":null},{\"Id\":\"Event_09j4j3x\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_07gwyrv\",\"Type\":10,\"Parameters\":{\"variable\":\"file\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Find CSV files in a local folder].Files\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For each file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0oszdaz\",\"Type\":1,\"Parameters\":{\"input\":{\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.SnowflakeConnectionString\"},\"CommandType\":{\"mode\":\"select\",\"value\":\"ExecuteNonQuery\"},\"CommandText\":{\"mode\":\"text\",\"value\":\"PUT file://{{#var.file.FullPath}} @%{{#var.SnowflakeTable}};\"}},\"options\":{\"ThrowExceptionOnError\":{\"mode\":\"toggle\",\"value\":true},\"TimeOut\":{\"mode\":\"integer\",\"value\":30}}},\"SelectedTypeId\":\"/ProcessTask/ef16b4e6-d5f9-4e9f-923c-6481f7f6ce79/v1\",\"PromoteResultAs\":null,\"Name\":\"Upload file to Snowflake table stage\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0mkgn3k\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Table stage upload successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1ey457z\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.uploads += 1\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_10igl2p\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_197w5tn\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.exceptions += $\\\"File {#var.file.FileName} could not be uploaded to Snowflake table stage: {#result[Upload file to Snowflake table stage].ErrorMessage}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0tsae29\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.exceptions != \\\"\\\" ? $\\\"{#var.uploads} file(s) were successfully uploaded to Snowflake. Following exception(s) occurred: \\\" + #var.exceptions.ToString(): $\\\"{#var.uploads} file(s) were successfully uploaded to Snowflake.\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0gb465a\",\"Type\":12,\"Parameters\":{\"variableName\":\"exceptions\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"\\\"\\\"\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize exceptions\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1726apq\",\"Type\":12,\"Parameters\":{\"variableName\":\"uploads\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize uploads\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_05ai6ux\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1i1x93w\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Files.Count != 0\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Files found?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_14dmc9r\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"No files with specified pattern found in folder {{#var.InFilePath}}.\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1gs7b40\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0jl4a8l\",\"Type\":1,\"Parameters\":{\"input\":{\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.SnowflakeConnectionString\"},\"CommandType\":{\"mode\":\"select\",\"value\":\"ExecuteReader\"},\"CommandText\":{\"mode\":\"text\",\"value\":\"COPY INTO {{#var.SnowflakeTable}}\\r\\nFILE_FORMAT = (\\r\\n    TYPE = CSV\\r\\n    FIELD_DELIMITER = ','\\r\\n    SKIP_HEADER = 1\\r\\n    )\\r\\nPURGE = TRUE;\"}},\"options\":{\"ThrowExceptionOnError\":{\"mode\":\"toggle\",\"value\":true},\"TimeOut\":{\"mode\":\"integer\",\"value\":30}}},\"SelectedTypeId\":\"/ProcessTask/ef16b4e6-d5f9-4e9f-923c-6481f7f6ce79/v1\",\"PromoteResultAs\":null,\"Name\":\"Upload file data to Snowflake table\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1n6pl9h\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Table upload successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1nzzhcd\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.exceptions += $\\\"File {#var.file.FileName} could not be uploaded to Snowflake table: {#result[Upload file data to Snowflake table].ErrorMessage}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_09vx9gp\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0rbsvru\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1bskae5\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_1pzs8lr\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Local fileshare\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/F74A6E79-5336-4875-A109-507F9E4BAA2E/v1\",\"/ProcessTask/EF16B4E6-D5F9-4E9F-923C-6481F7F6CE79/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.3.1743",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"f23d21f1-358e-45a7-b31b-aa9c12e94291": [
						{
							"Id": "f74a6e79-5336-4875-a109-507f9e4baa2e",
							"PackageId": "Frends.Files.Find",
							"PackageVersion": "1.0.1",
							"Name": "Frends.Files.Find.Files.Find(Input, Options)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "ef16b4e6-d5f9-4e9f-923c-6481f7f6ce79",
							"PackageId": "Frends.Snowflake.ExecuteQuery",
							"PackageVersion": "1.0.0",
							"Name": "Frends.Snowflake.ExecuteQuery.Snowflake.ExecuteQuery(Input, Options)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}