Hello,
Just to be sure we are doing this the right way... here's our current scenario:
We have source CSV files for VM products. These contain the complete products, with all possible fields.
We want to create separate templates, to import them partially.
e.g. We want a template to just import/update prices + availability, and ignore all the rest.
Can this be done?
I know there is a field selection for each template, but I am wondering if this is the filter we want, or if this just defines the format of the CSV file.
Thanks
Hello,
We want to create separate templates, to import them partially.
e.g. We want a template to just import/update prices + availability, and ignore all the rest.
Can this be done?
Yes, You can use skip template field for the fields you don't want to include in import. For doing this you need to set Use file for configuration as No in your template settings and on File tab. Add template fields you need to import and for the fields to be ignored add skip as template field.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Thank you.
Followup questions..
With your mentioned approach, I assume we need to define all the fields, and in the order they appear in the CSV file? And set which are to be skipped?
If so, may I suggest an improvement for some future version...
Because the import CSV files we get, may sometimes be re-ordered (columns), or perhaps a helper column may be inserted, the ordering is not 100% guaranteed.
It would be great if CSVi didn't care about the ordering of the fields, and simply define which fields we care about in a template, and just ignore all the rest.
(and perhaps the other way around, ignore X fields)
Irrespective of their ordering in the source file.
Thank you!
Hello,
With your mentioned approach, I assume we need to define all the fields, and in the order they appear in the CSV file? And set which are to be skipped?
Yes, you need to add fields in the order of headers of CSV file. The fields you want to ignore assign them to be skip template field.
Because the import CSV files we get, may sometimes be re-ordered (columns), or perhaps a helper column may be inserted, the ordering is not 100% guaranteed.
It would be great if CSVi didn't care about the ordering of the fields, and simply define which fields we care about in a template, and just ignore all the rest.
(and perhaps the other way around, ignore X fields)Irrespective of their ordering in the source file.
The ordering is needed else if the import file has columns headers which is not same as RO CSVI template fields, RO CSVI will not know which columns to match from the file.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
The ordering is needed else if the import file has columns headers which is not same as RO CSVI template fields, RO CSVI will not know which columns to match from the file.
There could be a mode which combines "Use import file as configuration" and "Include/Exclude" specified fields.
In our custom PHP code, we scan CSV files for pre-specified fields, irrespective of their position. And ignore all the rest. It works great (but it is built for other purposes).
Our CSV files contain the fields that CSVi understands (by their name), as well as other fields for other purposes, all in one document. It would just speed things up a lot, to just arbitrarily pick stuff out.
Maybe this is a very niche scenario we're discussing here, and there's no demand for this from the majority of your users.
Thanks for listening!
Hello,
In our custom PHP code, we scan CSV files for pre-specified fields, irrespective of their position. And ignore all the rest. It works great (but it is built for other purposes).
RO CSVI can do the same provided you have supported fields as column headers in import file.
Our CSV files contain the fields that CSVi understands (by their name), as well as other fields for other purposes, all in one document. It would just speed things up a lot, to just arbitrarily pick stuff out.
If your CSV file has fields that CSVI can understand then you can set Use file for configuration to Yes and run the import, CSVI will pick only the supported fields and ignores the rest of the fields. Note that all the supported fields will be picked from the file and not any specific fields. Please try and let me know.
Maybe this is a very niche scenario we're discussing here, and there's no demand for this from the majority of your users.
That is correct, you are our first user asking for this feature.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi Tharuna, following this thread I have a question.
Is it possible to use csvi to rename all relevant column header to match the with the supported fields before importing the provided csv file?
Regards,
Marc
Hello Marc,
Renaming column headers is not possible with current RO CSVI but you can use RO CSVI Field mapper to map the fields before import so import template is created based on the mapped fields. Did you try that?
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi Tharuna, I have tried this, but after mapping some of the columns and skip the others the created template has to template fields?!
I have read the following thread:
https://rolandd.com/support/ro-csvi/use-column-headers-for-configuration-and-apply-rules-to-fields
So I have also a lot of columns in my provided csv:
- I could not rename
- I have to skip
- I have to manipulate the existing data (tag, content associations, ...) to meet my needs
Regards,
Marc
Hello Marc,
but after mapping some of the columns and skip the others the created template has to template fields?!
I do not really understand what you are saying here. Could you elaborate?
The general idea for RO CSVI is, that you either use the headers in your file if they match your Joomla/extension system. If not, you can map the fields within RO CSVI with the correct Joomla/extension fields. Those fields you do not want to import get mapped to the skip field and RO CSVI will skip them.
I have to manipulate the existing data (tag, content associations, ...) to meet my needs
Data manipulation is something RO CSVI can do but it is limited to the skip rules, unless you build your own skip rule and add your own business logic in there.
The data to manipulate is because you get it in a completely different format?
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi Roland,
I try to explain my problem 'missing mapping' with the attached screenshots.
With Data manipulation I mean the global rules and field rules I could use to manipulate the data on import.
So I tried to change the column names with a global find replace rule to match the existing fields. (see attachment)
The setup is 'Use file for configuration' so that all columns, which do not match with the existing fields skip automatically.
But this doesn't work.
I am new to your component, so I try to figure out what is possible. :)
Kind Regards,
Marc
Hello Marc,
The screenshots help a lot. So the mapping you did is fine but did you use the Create template button in the mapping list? This will create a template for you with all fields setup as you mapped them.The mapped fields will then show up in the Fields tab and you can configure each field for your templates in the Template Fields page.
You can create a new template as often as you like from the Maps list. From the Template Fields list you can then modify each field and select one or more rules for each field.
Give that a try first and let us know how it goes and we can do the next step after that.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello Marc,
At first I had no idea but then I looked into it further and it turns out that when saving the fields it can fail due to more stricter databases not allowing empty values. So I have it fixed with what we call a patch file. You can follow the steps outlined in the How to load a patch file? document. After the patch is loaded, please create a new template from the maps list. The template must be a name that does not exist yet. After that you should have a template with fields linked to it.
Let us know how it goes.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi Roland,
I have installed the patch file and now the fields are created (s. attachment) :-)
I will go on from there and open a new thread, when I have further questions (which I surely will) ;-)
Thank you for your support.
Kind Regards,
Marc
Log in to reply to this topic.