﻿<?xml version="1.0" encoding="utf-8"?><XmlProjectInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="1102ff96-fab7-4b54-a4a2-2e9c1e4f3668" Name="REST API CVR" Type="0" OutputPath="build\" DefaultPublishProfile="Default" Version="2.12.3214.0" NotReplaceMacroInPreview="false" DisableMacroExtensions="false" TargitDbVersion="Version_1_213"><FileSystemObjects><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.XmlProjectModelInfo"><XmlProjectModelInfo FileName="REST API CVR.impm" BuildAction="Yes" Id="fe27f2a9-6315-4c26-ba78-fa0d275f1a0e" Created="2019-03-22T11:55:13.6072774+01:00" CreatedBy="MDBG\UZ4G" Edited="2022-09-12T08:56:48.9454521+02:00" EditedBy="TARGIT-INET\niels_t" IsOpened="true" CubeName="REST API CVR" PublishToServer="true" Is32BitExecutionMode="false" IsBaseScriptLocked="false" ExecuteOnScheduleOnly="false" IsStandard="false" RetryAttempts="0" RetryIntervalMins="0" RestartOnServiceFailure="true" RemoveDatabaseFromScheduler="false"><Instructions><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlGroupInstructionInfo"><XmlGroupInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.GroupToolSurfaceViewModel" Name="Debug" Id="fbb4e829-95c7-4d11-bde7-0f81a341ff02" IsExpanded="false"><InnerInstructions><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlScriptInstructionInfo"><XmlScriptInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.ScriptToolSurfaceViewModel" Name="DebugInfo" Id="bad3d013-57b4-409d-92d0-855e0cfb9266" Query="DECLARE @DebugInfo as INT&#xD;&#xA;DECLARE @CvrRestApiLoadCounter as INT&#xD;&#xA;&#xD;&#xA;/* DebugInfo: &#xD;&#xA;1 will keep temp,STAGE and WORK tables in final database. &#xD;&#xA;0 removes temp tables */&#xD;&#xA;SET @DebugInfo = 0&#xD;&#xA;&#xD;&#xA;/* Specify how many CVR Numbers to look up, during load */&#xD;&#xA;SET @CvrRestApiLoadCounter = 3" IsDisableMacro="false" /></IStorageInfo></InnerInstructions></XmlGroupInstructionInfo></IStorageInfo><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlGroupInstructionInfo"><XmlGroupInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.GroupToolSurfaceViewModel" Name="Load data" Id="ad9df14e-9b0a-4b37-ab5a-79e952e46161" IsExpanded="true"><InnerInstructions><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlImportInstructionInfo"><XmlImportInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.ImportToolSurfaceViewModel" Name="STAGE_CSV_CvrList" Id="8a6a8c94-871b-4eec-bad2-ef2bf63ba29c" DataSourceId="9e019edc-6891-449a-82aa-994294aa2935" DataSourceText="CSV_dk_semicolon" DataSourceQuery="select * from [TARGIT REST API\Examples\CVR API\Data\TARGIT DK CVR List.csv] " DataSourceQueryType="1" IsDisableMacro="false" IsUncolumnized="false" UseDisk="false" /></IStorageInfo><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlImportInstructionInfo"><XmlImportInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.ImportToolSurfaceViewModel" Name="WORK_CvrList" Id="978748ac-fa0c-4c2d-9675-4dbeb5a9aa74" DataSourceId="8d0931c9-4c61-4bc1-b02e-ce8cdbbe204b" DataSourceText="ME" DataSourceQuery="SELECT&#xD;&#xA;    [End User VAT Nbr - SAP],&#xD;&#xA;    [End User Name - SAP],&#xD;&#xA;    /* Returns a string which replaces all occurrences of string2 in string1 with string3 */&#xD;&#xA; /* Removes DKK first and then DK */&#xD;&#xA;    REPLACE(&#xD;&#xA;     REPLACE([End User VAT Nbr - SAP], 'DKK', '')&#xD;&#xA;     , 'DK', '') AS CvrNumber&#xD;&#xA;FROM [STAGE_CSV_CvrList]&#xD;&#xA;" DataSourceQueryType="1" IsDisableMacro="false" IsUncolumnized="false" UseDisk="false" /></IStorageInfo><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlScriptInstructionInfo"><XmlScriptInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.ScriptToolSurfaceViewModel" Name="STAGE_CvrRestApi_CVR" Id="791714b7-8336-4447-ae4f-b4e156bf7217" Query="/*&#xD;&#xA;select * from [] &#xD;&#xA;*/&#xD;&#xA;&#xD;&#xA;DECLARE @CvrNumber AS STRING&#xD;&#xA;DECLARE @i AS INT&#xD;&#xA;&#xD;&#xA;WHILE [WORK_CvrList].EOF=false and @i &lt; @CvrRestApiLoadCounter&#xD;&#xA; SET @i = @i + 1&#xD;&#xA; SET @CvrNumber = WORK_CvrList.CvrNumber&#xD;&#xA; PRINT 'Reading CVR data about ' + @CvrNumber&#xD;&#xA; PRINT 'Number ' + @i + ' of ' + @CvrRestApiLoadCounter&#xD;&#xA; IMPORT [STAGE_CvrRestApi_CvrData] = [CVR_REST_API].{select * from [] (PARAMETERS:CVR=@@CvrNumber)}&#xD;&#xA;MOVENEXT [WORK_CvrList]&#xD;&#xA;LOOP&#xD;&#xA;" IsDisableMacro="false" /></IStorageInfo></InnerInstructions></XmlGroupInstructionInfo></IStorageInfo><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Instructions.XmlInstructionInfo"><XmlInstructionInfo Visibility="0" IsLocked="false" ToolSurfaceViewModelClass="TARGIT.InMemory.ETL.Studio.ViewModels.ToolSurfaces.SaveToolSurfaceViewModel" Name="Save Database" Id="128ddc89-56b9-4a93-aa57-c60bc1a1dbe7" /></IStorageInfo></Instructions><Schedules><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.XmlSchedule"><XmlSchedule Name="Nightly update" ScheduleValue="0 0 2 1/1 * ? *" ExecutionTimeLimit="0" /></IStorageInfo></Schedules></XmlProjectModelInfo></IStorageInfo></FileSystemObjects><PublishProfiles><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.Publish.XmlPublishProfileInfo"><XmlPublishProfileInfo Name="Default"><PublishStrategyInfo xsi:type="XmlSchedulerServicePublishStrategyInfo" Server="localhost" OpenOutputFolderInWindowsExplorer="false" ExecuteAndFetchResultsLocally="false" DeleteAllExistingFiles="false"><Folder Id="ea108ab1-cc39-486e-9c0d-0a63a0cc8dfd" Name="Public" /></PublishStrategyInfo></XmlPublishProfileInfo></IStorageInfo></PublishProfiles><DataSources><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.DataSources.XmlJavascriptDataSourceInfo"><XmlJavascriptDataSourceInfo Id="b4fc2802-0200-4536-9c32-0a85d7807c4a" ConnectionString="'TARGIT.Javascript.JavascriptConnection' 'script=Tokengoeshere==;;scriptTimeoutSecs=600;LicenseAddress=localhost;LoadAsString=true'" DefaultQuery="" Name="CVR_REST_API" Type="TARGIT.InMemory.ETL.Studio.ViewModels.DataSources.JavascriptDataSourceViewModel" GenerateCode="Yes" IsLocked="false" Assembly="TARGIT.Javascript.dll" AssemblyType="Server" LoadAsString="false" ManuallyChangeConnectionString="true" Timeout="600" ConnectionStr="script=ICAkLmFqYXgoCiAgICB7CiAgICAgICAgdXJsOiAnaHR0cHM6Ly9jdnJhcGkuZGsvYXBpP3NlYXJjaD0lJUNWUiUlJmNvdW50cnk9ZGsnLAogICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChkYXRhKSB7CiAgICAgICAgICAgIGpzb25TdHJpbmdSZXN1bHQucmVnaXN0ZXJKc29uUmVzcG9uc2UoSlNPTi5zdHJpbmdpZnkoZGF0YSkpOy8vdGhpcyBsaW5lIGlzIHJlcXVpcmVkIHRvIHBhc3MgdGhlIEpTT04gc3RyaW5nIGludG8gdGhlIEphdmFTY3JpcHQgZHJpdmVyLgogICAgICAgIH0KICAgIH0pOw==;" Script="  $.ajax(&#xA;    {&#xA;        url: 'https://cvrapi.dk/api?search=%%CVR%%&amp;country=dk',&#xA;        success: function (data) {&#xA;            jsonStringResult.registerJsonResponse(JSON.stringify(data));//this line is required to pass the JSON string into the JavaScript driver.&#xA;        }&#xA;    });" /></IStorageInfo><IStorageInfo AssemblyQualifiedName="TARGIT.InMemory.ETL.Studio.Configuration.Xml.DataSources.XmlCsvDataSourceInfo"><XmlCsvDataSourceInfo Id="9e019edc-6891-449a-82aa-994294aa2935" ConnectionString="'TARGIT.CSV.CsvConnection' 'HasHeaders=true;loadasstring=true;type=local;delimiter=;;encoding=utf-8;culture=da-DK;detectionrowscount=100;skiplines=0;'" DefaultQuery="" Name="CSV_dk_semicolon" Type="TARGIT.InMemory.ETL.Studio.ViewModels.DataSources.CsvDataSourceViewModel" GenerateCode="Auto" IsLocked="false" Assembly="TARGIT.Csv.dll" AssemblyType="Server" LoadAsString="true" HasHeaders="true" Delimiter=";" Encoding="utf-8" Culture="da-DK" DataSourceType="LocalFile" DelimiterSelector="2" SkipLines="0" DetectionRowsCount="100" ManuallyChangeConnectionString="false" /></IStorageInfo></DataSources><Macros /><Synchronization IsEnabled="false" /></XmlProjectInfo>