SFTP to File Scenario using multiple files

Hi All,
I have a scenario wherein 2 separate CSV files ex a.csv and b.csv has to be picked up from the SFTP folder and the same has to be mapped and send to one single file ex c.csv.
Say a.csv contains fields Name,Address and b.csv contains Phone,Mobile and I need to map them as per FSD into c.csv which will then have Name,Address,Phone,Mobile
I am bit confused on how to do it.
Shall I use Additional File name option in SFTP sender channel configuration? In that case how will I use the FCC as we have 2 separate csv files and both the files are CSV files and needs to be converted to XML.
Any related threads will help.
Regards,
Shaibayan

Hi Inaki,
Thanks for your reply.
BPM is not an option in our case as we are told not to use BPM.
However as per the thread from Michael
"pick both files in one run (one as file, the other one as attachment - so one communication channel )
inside the mapping you can get the values from the attachment and do the mapping"
This part is fine and we can do the mapping by creating N:1 mapping but since our files are .csv files so a content conversion is required for both the a.csv and b.csv. How to go through with this.
The structure will be something like below in the message mapping after we add both the source structures in Signature Tab:
Message
     Message1
          MT_FILE_A
               RecordSet1
                    Name
                    Address
                    Field3
     Message2
          MT_FILE_B
               RecordSet2
                    Phone
                    Mobile
Can I use the below values for Content Conversion?
Document Name:MT_FILE_A,MT_FILE_B
Recordset Structure:RecordSet1,*,RecordSet2,* or we have to use MT_FILE_A.RecordSet1,*,MT_FILE_B.RecordSet2.*
And in the Name Value for Name do we need to use dot for each Document Name i.e.
MY_FILE_A.RecordSet1.fieldSeparator?
Regards,
Shaibayan

Similar Messages

  • File to File scenario using Transport Protocol FTP  Problem

    Hi,
    my scenario is a file to file scenario using Transport Protocol FTP
    there are 3 systems involved
    a. computer 1 ( My system-source)
    b. computer 2 (XI server)
    c. computer 3 (Target system)
    I want XI to pick file from computer 1 and post it to computer 3
    I am logging on to XI server from computer 1(thro SAP GUI),
    <u><b>Sender communication  channel :</b></u>
    Transport protocol:FTP
    Messsage protocol: file
    <u><b>In FTP connection Parameters:</b></u>
    Server: computer 1 IP address
    port:21
    User name and PW---> I have given computer 1 Username and password.
    Connection mode: permanently
    Transfer mode: Binary
    Folder: C:\ftproot\output
    filename : given
    <u><b>In Receiver Communication Channel</b></u>
    Transport protocol:FTP
    Message protocol: file
    <u><b>In FTP connection Parameters:</b></u>
    Server: computer 3 IP address
    port:21
    User name and PW---> I have given computer 3 Username and password.
    Connection mode: permanently
    Transfer mode: Binary
    Put File: Use Temporary File
    Folder:
    eccserver\saploc\tmp
    filename scheme: given
    When I activate the scenario file is not getting picked from the source
    In Adapter Framework: Message says up and running No message processing now
    How to check FTP server is up and running on computer 1 (source system)and Computer 2 (XI server)?
    What could be the problem ?
    Thanks
    dushanth

    Hi
    Consider that I dont have FTP installed on my computer. According to this blog
    /people/shabarish.vijayakumar/blog/2006/08/01/along-came-a-file-adapter-mr-ftp-and-rest-of-the-gang
    I have configured.
    In sender comm channel I have given Ipaddress of computer 1 (which has a file to be picked)
    In Receiver Comm channel I have given IP address of computer 3 (in which file to be posted)
    and computer 2 is the XI server
    Computer 1 has FTP installed
    1. XI server should have FTP installed or not ? IF yes is it FTP client  or FTP server   or Guild FTP (according to the blog is enough)
    2. Computer 3 should have FTP installed or not ?
    Please help me I am really confused.
    Thanks
    dushanth

  • How To Split File In to Multiple Files With out using B.P.M

    Hi Guys,
    How To Split File In to Multiple Files With out using B.P.M.
    Thanks in advance
    Regards's
    KIran.B

    Hello
    below r the links were u will find message spilitting by graphicaaly i.e without using BPM.
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
    Sender File Adapter with file conversion  Multimapping --file content conversion with split messg mapping
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2748---- [original link is broken] [original link is broken] [original link is broken]
    multimappig
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    hope this resolve your problem
    thank's
    Chetan

  • Sliding Window Table Partitioning Problems with RANGE RIGHT, SPLIT, MERGE using Multiple File Groups

    There is misleading information in two system views (sys.data_spaces & sys.destination_data_spaces) about the physical location of data after a partitioning MERGE and before an INDEX REBUILD operation on a partitioned table. In SQL Server 2012 SP1 CU6,
    the script below (SQLCMD mode, set DataDrive  & LogDrive variables  for the runtime environment) will create a test database with file groups and files to support a partitioned table. The partition function and scheme spread the test data across
    4 files groups, an empty partition, file group and file are maintained at the start and end of the range. A problem occurs after the SWITCH and MERGE RANGE operations, the views sys.data_spaces & sys.destination_data_spaces show the logical, not the physical,
    location of data.
    --=================================================================================
    -- PartitionLabSetup_RangeRight.sql
    -- 001. Create test database
    -- 002. Add file groups and files
    -- 003. Create partition function and schema
    -- 004. Create and populate a test table
    --=================================================================================
    USE [master]
    GO
    -- 001 - Create Test Database
    :SETVAR DataDrive "D:\SQL\Data\"
    :SETVAR LogDrive "D:\SQL\Logs\"
    :SETVAR DatabaseName "workspace"
    :SETVAR TableName "TestTable"
    -- Drop if exists and create Database
    IF DATABASEPROPERTYEX(N'$(databasename)','Status') IS NOT NULL
    BEGIN
    ALTER DATABASE $(DatabaseName) SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE $(DatabaseName)
    END
    CREATE DATABASE $(DatabaseName)
    ON
    ( NAME = $(DatabaseName)_data,
    FILENAME = N'$(DataDrive)$(DatabaseName)_data.mdf',
    SIZE = 10,
    MAXSIZE = 500,
    FILEGROWTH = 5 )
    LOG ON
    ( NAME = $(DatabaseName)_log,
    FILENAME = N'$(LogDrive)$(DatabaseName).ldf',
    SIZE = 5MB,
    MAXSIZE = 5000MB,
    FILEGROWTH = 5MB ) ;
    GO
    -- 002. Add file groups and files
    --:SETVAR DatabaseName "workspace"
    --:SETVAR TableName "TestTable"
    --:SETVAR DataDrive "D:\SQL\Data\"
    --:SETVAR LogDrive "D:\SQL\Logs\"
    DECLARE @nSQL NVARCHAR(2000) ;
    DECLARE @x INT = 1;
    WHILE @x <= 6
    BEGIN
    SELECT @nSQL =
    'ALTER DATABASE $(DatabaseName)
    ADD FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';
    ALTER DATABASE $(DatabaseName)
    ADD FILE
    NAME= ''$(TableName)_f' + CAST(@x AS CHAR(5)) + ''',
    FILENAME = ''$(DataDrive)\$(TableName)_f' + RTRIM(CAST(@x AS CHAR(5))) + '.ndf''
    TO FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';'
    EXEC sp_executeSQL @nSQL;
    SET @x = @x + 1;
    END
    -- 003. Create partition function and schema
    --:SETVAR TableName "TestTable"
    --:SETVAR DatabaseName "workspace"
    USE $(DatabaseName);
    CREATE PARTITION FUNCTION $(TableName)_func (int)
    AS RANGE RIGHT FOR VALUES
    0,
    15,
    30,
    45,
    60
    CREATE PARTITION SCHEME $(TableName)_scheme
    AS
    PARTITION $(TableName)_func
    TO
    $(TableName)_fg1,
    $(TableName)_fg2,
    $(TableName)_fg3,
    $(TableName)_fg4,
    $(TableName)_fg5,
    $(TableName)_fg6
    -- Create TestTable
    --:SETVAR TableName "TestTable"
    --:SETVAR BackupDrive "D:\SQL\Backups\"
    --:SETVAR DatabaseName "workspace"
    CREATE TABLE [dbo].$(TableName)(
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_scheme(Partition_PK)
    ) ON $(TableName)_scheme(Partition_PK)
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_GUID_PK] DEFAULT (newid()) FOR [GUID_PK]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateServer] DEFAULT (@@servername) FOR [CreateServer]
    -- 004. Create and populate a test table
    -- Load TestTable Data - Seconds 0-59 are used as the Partitoning Key
    --:SETVAR TableName "TestTable"
    SET NOCOUNT ON;
    DECLARE @Now DATETIME = GETDATE()
    WHILE @Now > DATEADD(minute,-1,GETDATE())
    BEGIN
    INSERT INTO [dbo].$(TableName)
    ([Partition_PK]
    ,[RandomNbr])
    VALUES
    DATEPART(second,GETDATE())
    ,ROUND((RAND() * 100),0)
    END
    -- Confirm table partitioning - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    --=================================================================================
    -- SECTION 2 - SWITCH OUT
    -- 001 - Create TestTableOut
    -- 002 - Switch out partition in range 0-14
    -- 003 - Merge range 0 -29
    -- 001. TestTableOut
    :SETVAR TableName "TestTable"
    IF OBJECT_ID('dbo.$(TableName)Out') IS NOT NULL
    DROP TABLE [dbo].[$(TableName)Out]
    CREATE TABLE [dbo].[$(TableName)Out](
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)Out] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_fg2;
    GO
    -- 002 - Switch out partition in range 0-14
    --:SETVAR TableName "TestTable"
    ALTER TABLE dbo.$(TableName)
    SWITCH PARTITION 2 TO dbo.$(TableName)Out;
    -- 003 - Merge range 0 - 29
    --:SETVAR TableName "TestTable"
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (15);
    -- Confirm table partitioning
    -- Original source of this query - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber  
    The table below shows the results of the ‘Confirm Table Partitioning’ query, before and after the MERGE.
    The T-SQL code below illustrates the problem.
    -- PartitionLab_RangeRight
    USE workspace;
    DROP TABLE dbo.TestTableOut;
    USE master;
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f3 ;
    -- ERROR
    --Msg 5042, Level 16, State 1, Line 1
    --The file 'TestTable_f3 ' cannot be removed because it is not empty.
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f2 ;
    -- Works surprisingly!!
    use workspace;
    ALTER INDEX [PK_TestTable] ON [dbo].[TestTable] REBUILD PARTITION = 2;
    --Msg 622, Level 16, State 3, Line 2
    --The filegroup "TestTable_fg2" has no files assigned to it. Tables, indexes, text columns, ntext columns, and image columns cannot be populated on this filegroup until a file is added.
    --The statement has been terminated.
    If you run ALTER INDEX REBUILD before trying to remove files from File Group 3, it works. Rerun the database setup script then the code below.
    -- RANGE RIGHT
    -- Rerun PartitionLabSetup_RangeRight.sql before the code below
    USE workspace;
    DROP TABLE dbo.TestTableOut;
    ALTER INDEX [PK_TestTable] ON [dbo].[TestTable] REBUILD PARTITION = 2;
    USE master;
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f3;
    -- Works as expected!!
    The file in File Group 2 appears to contain data but it can be dropped. Although the system views are reporting the data in File Group 2, it still physically resides in File Group 3 and isn’t moved until the index is rebuilt. The RANGE RIGHT function means
    the left file group (File Group 2) is retained when splitting ranges.
    RANGE LEFT would have retained the data in File Group 3 where it already resided, no INDEX REBUILD is necessary to effectively complete the MERGE operation. The script below implements the same partitioning strategy (data distribution between partitions)
    on the test table but uses different boundary definitions and RANGE LEFT.
    --=================================================================================
    -- PartitionLabSetup_RangeLeft.sql
    -- 001. Create test database
    -- 002. Add file groups and files
    -- 003. Create partition function and schema
    -- 004. Create and populate a test table
    --=================================================================================
    USE [master]
    GO
    -- 001 - Create Test Database
    :SETVAR DataDrive "D:\SQL\Data\"
    :SETVAR LogDrive "D:\SQL\Logs\"
    :SETVAR DatabaseName "workspace"
    :SETVAR TableName "TestTable"
    -- Drop if exists and create Database
    IF DATABASEPROPERTYEX(N'$(databasename)','Status') IS NOT NULL
    BEGIN
    ALTER DATABASE $(DatabaseName) SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE $(DatabaseName)
    END
    CREATE DATABASE $(DatabaseName)
    ON
    ( NAME = $(DatabaseName)_data,
    FILENAME = N'$(DataDrive)$(DatabaseName)_data.mdf',
    SIZE = 10,
    MAXSIZE = 500,
    FILEGROWTH = 5 )
    LOG ON
    ( NAME = $(DatabaseName)_log,
    FILENAME = N'$(LogDrive)$(DatabaseName).ldf',
    SIZE = 5MB,
    MAXSIZE = 5000MB,
    FILEGROWTH = 5MB ) ;
    GO
    -- 002. Add file groups and files
    --:SETVAR DatabaseName "workspace"
    --:SETVAR TableName "TestTable"
    --:SETVAR DataDrive "D:\SQL\Data\"
    --:SETVAR LogDrive "D:\SQL\Logs\"
    DECLARE @nSQL NVARCHAR(2000) ;
    DECLARE @x INT = 1;
    WHILE @x <= 6
    BEGIN
    SELECT @nSQL =
    'ALTER DATABASE $(DatabaseName)
    ADD FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';
    ALTER DATABASE $(DatabaseName)
    ADD FILE
    NAME= ''$(TableName)_f' + CAST(@x AS CHAR(5)) + ''',
    FILENAME = ''$(DataDrive)\$(TableName)_f' + RTRIM(CAST(@x AS CHAR(5))) + '.ndf''
    TO FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';'
    EXEC sp_executeSQL @nSQL;
    SET @x = @x + 1;
    END
    -- 003. Create partition function and schema
    --:SETVAR TableName "TestTable"
    --:SETVAR DatabaseName "workspace"
    USE $(DatabaseName);
    CREATE PARTITION FUNCTION $(TableName)_func (int)
    AS RANGE LEFT FOR VALUES
    -1,
    14,
    29,
    44,
    59
    CREATE PARTITION SCHEME $(TableName)_scheme
    AS
    PARTITION $(TableName)_func
    TO
    $(TableName)_fg1,
    $(TableName)_fg2,
    $(TableName)_fg3,
    $(TableName)_fg4,
    $(TableName)_fg5,
    $(TableName)_fg6
    -- Create TestTable
    --:SETVAR TableName "TestTable"
    --:SETVAR BackupDrive "D:\SQL\Backups\"
    --:SETVAR DatabaseName "workspace"
    CREATE TABLE [dbo].$(TableName)(
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_scheme(Partition_PK)
    ) ON $(TableName)_scheme(Partition_PK)
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_GUID_PK] DEFAULT (newid()) FOR [GUID_PK]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateServer] DEFAULT (@@servername) FOR [CreateServer]
    -- 004. Create and populate a test table
    -- Load TestTable Data - Seconds 0-59 are used as the Partitoning Key
    --:SETVAR TableName "TestTable"
    SET NOCOUNT ON;
    DECLARE @Now DATETIME = GETDATE()
    WHILE @Now > DATEADD(minute,-1,GETDATE())
    BEGIN
    INSERT INTO [dbo].$(TableName)
    ([Partition_PK]
    ,[RandomNbr])
    VALUES
    DATEPART(second,GETDATE())
    ,ROUND((RAND() * 100),0)
    END
    -- Confirm table partitioning - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    --=================================================================================
    -- SECTION 2 - SWITCH OUT
    -- 001 - Create TestTableOut
    -- 002 - Switch out partition in range 0-14
    -- 003 - Merge range 0 -29
    -- 001. TestTableOut
    :SETVAR TableName "TestTable"
    IF OBJECT_ID('dbo.$(TableName)Out') IS NOT NULL
    DROP TABLE [dbo].[$(TableName)Out]
    CREATE TABLE [dbo].[$(TableName)Out](
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)Out] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_fg2;
    GO
    -- 002 - Switch out partition in range 0-14
    --:SETVAR TableName "TestTable"
    ALTER TABLE dbo.$(TableName)
    SWITCH PARTITION 2 TO dbo.$(TableName)Out;
    -- 003 - Merge range 0 - 29
    :SETVAR TableName "TestTable"
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (14);
    -- Confirm table partitioning
    -- Original source of this query - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    The table below shows the results of the ‘Confirm Table Partitioning’ query, before and after the MERGE.
    The data in the File and File Group to be dropped (File Group 2) has already been switched out; File Group 3 contains the data so no index rebuild is needed to move data and complete the MERGE.
    RANGE RIGHT would not be a problem in a ‘Sliding Window’ if the same file group is used for all partitions, when they are created and dropped it introduces a dependency on full index rebuilds. Larger tables are typically partitioned and a full index rebuild
    might be an expensive operation. I’m not sure how a RANGE RIGHT partitioning strategy could be implemented, with an ascending partitioning key, using multiple file groups without having to move data. Using a single file group (multiple files) for all partitions
    within a table would avoid physically moving data between file groups; no index rebuild would be necessary to complete a MERGE and system views would accurately reflect the physical location of data. 
    If a RANGE RIGHT partition function is used, the data is physically in the wrong file group after the MERGE assuming a typical ascending partitioning key, and the 'Data Spaces' system views might be misleading. Thanks to Manuj and Chris for a lot of help
    investigating this.
    NOTE 10/03/2014 - The solution
    The solution is so easy it's embarrassing, I was using the wrong boundary points for the MERGE (both RANGE LEFT & RANGE RIGHT) to get rid of historic data.
    -- Wrong Boundary Point Range Right
    --ALTER PARTITION FUNCTION $(TableName)_func()
    --MERGE RANGE (15);
    -- Wrong Boundary Point Range Left
    --ALTER PARTITION FUNCTION $(TableName)_func()
    --MERGE RANGE (14);
    -- Correct Boundary Pounts for MERGE
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (0); -- or -1 for RANGE LEFT
    The empty, switched out partition (on File Group 2) is then MERGED with the empty partition maintained at the start of the range and no data movement is necessary. I retract the suggestion that a problem exists with RANGE RIGHT Sliding Windows using multiple
    file groups and apologize :-)

    Hi Paul Brewer,
    Thanks for your post and glad to hear that the issue is resolved. It is kind of you post a reply to share your solution. That way, other community members could benefit from your sharing.
    Regards.
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Could any one provide me with the links of file to file scenario using BPM

    Could any one provide me with the links of file to file scenario using BPM

    Hi,
    omit RFC part
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to read multiple files and generate multiple files

    Dear all, I would like to process some LTE measurement files. Currently I can only load a single file and process the data and save it to a single binary file. Since I would like to run the code continously, could someone show me how I can modify the code to load multiple files and specify multiple files to save the process the data please? I have attached the code to the question. Many thanks for your help.
    Attachments:
    RF Analyze IQ File.vi ‏46 KB

    There is no official "bin" format and I am confused by some of your statements:
    Kiwibunny wrote:
    Currently I can only load a single file and process the data and save it to a single binary file. Since I would like to run the code continously, could someone show me how I can modify the code to load multiple files and specify multiple files to save the process the data please? I have attached the code to the question. Many thanks for your help.
    What you could do is use "list folder" with *.bin as pattern, and use a FOR loop and iterate over all *.bin files found in a selected folder.
    In any case, your code uses some weird constructs and you seem to do way to much. Are you using "continuous run" mode? Don't!
    Use a proper state machine instead ot these stalling loops. Why do you need to query the queue after each enqueue? Why do you need a queue at all?
    LabVIEW Champion . Do more with less code and in less time .

  • Alerts-Idoc to File Scenario using BPM

    Dear all,
    At the sender side,I am sending 2 Idoc's orders03,orders04 Idocs I am Merging in to single at my mapping level and sending to the respective receivers.
    When even some error occurs at system level or application level,an alert must be sent to the respective valid receipents.
    My question is,when creating the  Alert Rule how to use the interfaces(orders03,04) (here I have multiple senders).
    Is Alert rule required in BPM scenario's?if not let me know how alerts would be triggered for bpm scenarios.
    Thanks,
    Srini

    Hi,
    Let me see if I had you requirement correct.
    When the Idoc is sent from R3, sender partner type is LS and Receiver Partner Type is LI.
    If yes,
    1. Create a Party in ID.
    2. The Agency , Scheme and Identifier will have values,
    Agency --> Receiver Business System name or Business Service Name  to be used for File.
    Scheme --> ALE#LI
    Identiier --> Value of the RCVPRN field in the idoc control Record. Basically the Receiver Partner Name.
    All the Configuration In ID will use this Party as the Receiver Party and the corresponding Service asthe Receiver service.
    No need for a sender party as sender partner is LS.
    Regards
    Bhavesh

  • How do I use Finder to modify file details in multiple files

    I am new to the mac (OS10.7.4) having recently transitioned from Windows (and go way back to CPM - for those that remember).  I am trying to achieve through finder what I can do in windows explorer by selecting multiple files, selecting  properties and then selecting (and then modifying) details.  I tried the similar thing on Finder using Get Info instead of Properties but only ended up with multiple windows, one for each file selected (and had to close each one individually! ).  Tried 'option-command-I' on multiple selected files, it worked, but the common tags that I wanted to alter where not available for editing.  I can simply, but clumsily, achieve the outcome I want by cutting and pasting the files to a usb stick, making the modifications on the windows machine and pasting them back on the mac.     This should be a simple basic operating system function regardless of platform - advice on how to find/achieve it appreciated!

    I find it best to use small little apps to help modify many files. Just serach for what you want to change and more often then not, you find software that does what you need, often free too.
    For Music tags: check out the free program "TriTag" to do what you want:
    http://www.feedface.com/projects/tritag.html
    For Music conversion (say, from FLAC to Apple Lossless) or MP3 to whatever... Use "XLD" (free)
    http://download.cnet.com/X-Lossless-Decoder/3000-2140_4-189505.html
    Bonus: VLC (free download) - has the ability to convert wma audio files, which is amazing, it's rare to find mac software that will convert wma to mp3 - http://9thport.net/2010/07/28/using-os-x-to-convert-wma-to-mp3-for-free/
    For file renaming in batch, I use "Name Mangler" - 10 bucks, app store.
    It has a lot of pro features and is very useful.
    good luck.
    - James

  • HTTP to File Scenario using URL parameters.

    Hi,
    I am working on a HTTP to file scenario where POST method is hirring the XI server with authentication parameters.
    CAD application is trying to hot our XI server using POST Method and the application does not have ability to send XML payload to XI server directly.
    So we are simply receiving parameters in plain text in inbound payload.
    I need to convert this payload to XML format and am tring to work this out using dynamic configuration.
    But It is throwing parser error.
    BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 73, 75, 62(:main:, row:1, col:3) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:157) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:770)
    Here I have to use HTTP sender adapter.
    Please suggest how can I acheive this.??
    Regards,
    Sachi

    Hi Mark and Maciej,
    The Inbpound payload we are reciving is of the kind:
    sap-user=<UserID>&sap-password=<Pwd>&Param1=Sachi&submit=submit
    As in HTML we ar using hidden parameters to given authentication details and submmit button to hit XI serrver.
    Can you please help me to out how can I add prolog and epilog.
    How can I change my payload to XML format.
    Regards,
    Sachi

  • Flat File to Flat File Scenario using File Adapter

    Hi Experts,
                    In my scenario, requirement is Flat File to Flat file through File Adapter in PI. At sender end, we would need to use Sender File Adapter (NFS) and receiver end we would need to use Receiver File Adapter (FTP). File would be coming as a encrypted format, and the file needs to be sent in encrypted format.
                    Any idea how to proceed with this requirement would be helpful.
    Thanks and Regards
    Soumya

    Hi Soumya,
    You need to choose the FTP in the "transport protocol" option. Then in the FTP connection parameters choose the option Connection Security and assign the value "FTPS for control and Data Connection". Then the "Command Order" will show up below that option and you could leave the default value itself. If you are using Public private key certificates of X.509 then you could choose the option "Use x.509 certificate for client authentication" and assign the values to the "keystore" and "certificate & private key" fields.
    Note: To use the FTP with SSL you need to add the CA certificate to the TrustedCAs keystore view.
    Regards,
    Vishnu.

  • Issues in IDOC to File scenario using bussiness service

    Hi Team
    I found a blog which explains about the IDOC to FILE scenario by using bussinss services. I followed the steps and finally i am getting a error message while posting an idoc in we19 (ie IDOC 09878 was saved but cannot or should not be sent).  The setting which have done on SAP side are as below
    SAP SIDE CONFIGURATIONS
    1. Created RFC destination : RFC_XI_SYSTEM
    2. Created port : PORT_TEST
    3. created logical system: IDOC2FILE
    4. created partner profiles: IDOC2FILE
    XI side configurations
    1. Created RFC destination: RFC_SAP_SYSTEM
    2. Created port : by using IDX1 t-code
    DOUBT: here it is asking for PORT, CLIENT,Description and RFC destination, please let me know what values i need to put here, please find the SAP and XI system details below and suggest accordingly.
    3. metadata: by using idx2.
    DOUBT: here it is asking for IDOC type and source port,  i can give the idoc name but i am not getting what i need to give to source prort field, please check and let me know,  please find the SAP and XI system details below and suggest accordingly.
    SAP system details
    Client: 800
    User name: sapuser
    system id: DEV
    system number:10
    XI system details
    Client:100
    username:xisuper
    system id: SXI
    system numebr: 00
    I request you to please check and help to successfullly completion of this scenario. I request you to please provide me the screen shots of the pre-requiste settings and suggest me the steps to debug the scenario.
    Thanks in advance.
    Raju

    To complete your scenario successfully with better understanding of Idoc adapter
    read http://help.sap.com/saphelp_nw70/helpdata/en/ab/bdb13b00ae793be10000000a11402f/content.htm.
    for troubleshooting refer http://help.sap.com/saphelp_nw70/helpdata/en/6a/e6194119d8f323e10000000a155106/content.htm

  • How to use the js in the case of not sure the file name into multiple files to PS?

    function place($path){
        var idPlc = charIDToTypeID( "Plc " );
        var desc28 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc28.putPath( idnull, new File( $path ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc28.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc29 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc29.putUnitDouble( idHrzn, idRlt, 0.000000 );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc29.putUnitDouble( idVrtc, idRlt, 0.000000 );
        var idOfst = charIDToTypeID( "Ofst" );
        desc28.putObject( idOfst, idOfst, desc29 );
        executeAction( idPlc, desc28, DialogModes.NO );
    for(i=1;i<=4;i++){
        place ("E:\\aaa\\"+i+".jpg");
    目前我的解决方案是,把多个文件提前修改成数字序列,然后用for循环调用,我想问的是,如果我不更改文件名,是否也可以同时导入多个文件?
    At present my solution is to advance the multiple files modified into a sequence of Numbers, and then use a for loop calls, I want to ask is, if I don't change the file name, also can import multiple files at the same time?

    You could use a file or folder selection dialog and then feed the selected files into the for-clause.
    var aFile = selectFile(true);
    alert (aFile);
    ////// select file //////
    function selectFile (multi) {
    if (multi == true) {var theString = "please select files"}
    else {var theString = "please select one file"};
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog (theString, '*.jpg;*.tif;*.psd;*.png', multi)}
    else {var theFiles = File.openDialog (theString, getFiles, multi)};
    ////// filter files  for mac //////
    function getFiles (theFile) {
        if (theFile.name.match(/\.(jpg|tif|psd|png)$/i) || theFile.constructor.name == "Folder") {
            return true
    return theFiles

  • File to File scenario using NFS.

    Hi All,
    I am learning XI and got stick in a relatively simple issue.
    I am creating a scenario wherein a file from a directory on local machine say (D:/xi_input) is transferred to a directory on local machine only (say D:/xi_output).
    I guess this scenario is feasible using NFS, but i m getting an error in communication channel -
    "Configured source directory 'D:/xi_input' does not exist"
    After reading some documents and threads on sdn, i could understand that we have to replace '\' with '/'. But even with this same error is coming. Can you feel throw an insight where could the problem be,
    Thanks in advnace,
    Shreya

    Hi Shreya,
    PI will not pick up the file directly stored on your local machine.
    You have to put this file on the PI server directory.
    For this, you can use the transaction sxda_tools and put the file in the required directory of PI server,
    and then start the communication channel.
    -Supriya.

  • Idoc to File scenario using Party

    Hi All,
               I have to configure Idoc to File scenario .This file needs to be posted in EDI Subsystem .My receiver partner type is LI.That means i need to use Party here.So please let me know the step by step solution to do this.Specially i want to know the configuration in Party Identifier and Receiver Communication channel Identifiers.
    How the control record values from idoc are transferred to EDI File structure and how will XI identify one of the many customers to post the file.
    All valuable suggestions will be rewarded the points.
    Please send me the documents for such scenario with screen shots.

    Hi,
    Let me see if I had you requirement correct.
    When the Idoc is sent from R3, sender partner type is LS and Receiver Partner Type is LI.
    If yes,
    1. Create a Party in ID.
    2. The Agency , Scheme and Identifier will have values,
    Agency --> Receiver Business System name or Business Service Name  to be used for File.
    Scheme --> ALE#LI
    Identiier --> Value of the RCVPRN field in the idoc control Record. Basically the Receiver Partner Name.
    All the Configuration In ID will use this Party as the Receiver Party and the corresponding Service asthe Receiver service.
    No need for a sender party as sender partner is LS.
    Regards
    Bhavesh

  • File - to - JDBC- to - File  Scenario using Stored Procedure

    Hi,
      I want to do File - to - JDBC - to - File  scenario, because I'm getting data in a file format and that data i want to load in a database. Database level i have a stored procedure. if any exceptions. my stored procedure will give the Response. so, now i want to store that resposne in a file..
    for this. what are the steps we have to use. is this scenario will comes in Synch ronous or Asynchronous  ? and  I have searched the web blogs also. al the blogs are related to Http or Soap  with JDBC . so, please give me some input  help about this...
    how many data types we have to create... any body having step step procedure for this...
    regards
    Jain

    Hi,
    You will need a BPM in your design as Sender File adapter does not support Synchronous messaging. Refer my answer in this thread (page 2) and have your design accordingly....instead of RFC you will have a file adapter as the ultimate receiver.
    Re: BPM FILE--> JDBC--> RFC
    Just take care of below things:
    1) JDBC message format is as per the guidelines
    [Message format for sending req to JDBC|http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm]
    2) check for the format of your source and target file format (if it is a Flat-file with a xml structure that XI can parse then no need of FCC but if it is a CSV file then you will need FCC)
    Regards,
    Abhishek
    Edited by: abhishek salvi on Apr 14, 2009 7:32 PM

Maybe you are looking for

  • FI-MM and FI- SD Queries... Please Help

    Hi Gurus, Please help me with the following queries- 1. How movement type and valuation class helps in determining G/L A/C? 2. Where do I configure GL A/C as per movement type and valuation class? 3. Where I can see G/L postings of individual materia

  • MacBook Pro restarting - Kernel issue

    My work computer has started to restart when I leave it for a period of time. I come back after being out of the office and when I wake it up from sleep it restarts. I originally thought it was related to my wireless USB mouse and have stopped using

  • Form suddenly returning xml file via email instead of pdf

    I've got a form online that has been working the way I wanted for at least several months which is to send a completed pdf form (job application)as an attachment via email. Now I just received an email with an xml file instead of the pdf file. When I

  • Bug Report: #HOME_LINK# doesn't work in "List" template

    Hi, tried to use the #HOME_LINK# substitution built-in in the "Before List Entry" property of a "List" template, but it isn't replaced. Used &HOME_LINK. instead, that one is replaced, but the substitution string &APP_ID. inside the HOME_LINK isn't tr

  • Bluetooth mouse won't pair after recent os updates

    Hi there, Since I installed the two updates for snow leopard yesterday my bluetooth mouse will not pair. I go to setup bluetooth device & when i press the button to make it discoverable it appears right away so I click contnue & after a short while g