Developer forum

Forum » Integration » Create mappings at runtime

Create mappings at runtime

Davy Capiau
Reply

Hi,

I have a data integration with source provider csv and destination ECOM provider EcomProducts.

In my source settings I've defined a folder (not a file). This folder contains different files, all with the same structure but a different filename:

I want to import them all with the same integration. Since the headers are the same in the files, and they match the destination mapping (e.g. ProductId), I enabled 'create mappings at runtime'.

Expected result:

- All files are imported

Result:

- No files are imported.

 

As a check: When I disable the option and do a regular import selecting one of the files, it works fine. 

 

My question:

How can I automate the import so all files are imported following the same mapping, without needing to define it for every file (table)?


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Davy,
the problem is that bulding of the mappings at runtime is made by comparing the file name (because it is a CSV file where one file represent its own table) with the destination table name and if they match the mapping is built, so if you have different file names that don't match with the destination table that will not work with the CSV provider as a source. So maybe you can implement some custom subscriber that can combine the content from all CSV files into one file? Or use xml provider instead that supports the feature you need?
Xml provider setup is explained here.
BR, Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum