I want to create an own data source in wfa. It contains IP addresses, interfaces, ipspaces and netmasks for new vfilers. I already created a dictionary object and the data source object. Now I'm searching for a code example in powershell to import an excel file into the cache database. Any hints or code examples are highly appreciated.
Unfortunately it doesn't work. Maybe I'm missing something. First I tried it with the script. Then I copied the file manually to ...wfa\jboss\server\default\tmp\wfa and it did not work too. The file gets deleted from this folder when I aquire the data source. Error message stays the same. File is not found.
I gave it a new try with a new scheme. Now wfa tries to import the data and I get the error data trucated for column id at row 1. However, I have no column id. Do I have to put one in my input file? Or in more general how does my input file should look like when I have the columns ip,interface,ipspace,netmask,hostname?
I just published the new How-To video for this. I ran out of time to get it posted this past Friday. Please take a look and let me know if you have any other questions. This should get you off the ground.
great video, thanks. I exported the data from an excel spread sheet as tab separated but it seems not to work. I get the error "data truncated at row 1". Do I have to add the \N at the beginning of each line in the file or is there any possibility to get the input file directly from the excel spread sheet? And can you post the ppt file from the video as well?
My file looks like this:
1 220.127.116.11 vif3-231 its 255.255.255.128 v998spnvv1013e
2 18.104.22.168 vif3-231 its 255.255.255.128 v998spnvv1020e
3 22.214.171.124 vif3-231 its 255.255.255.128 v998spnvv1029e
4 126.96.36.199 vif3-231 its 255.255.255.128 v998spnvv1032e
5 188.8.131.52 vif3-231 its 255.255.255.128 v998spnvv1049e
6 184.108.40.206 vif3-231 its 255.255.255.128 v998spnvv1056e
7 220.127.116.11 vif3-231 its 255.255.255.128 v998spnvv1058e
Thanks for checking out the video, I am happy to hear that it helped. Yeah, the \N seems to be very important. Also, you do not need to add an ID field in your file as it is automatically created with the import. Please don't forget to mark this question as answered.
The first column seems to be a hidden column called 'id' for the primary key in the WFA database. The \N tells mysql it's a null field, so mysql creates its own value. You could put your own key in there instead of \N if you wanted to.
View the Data Source script for the vc Scheme under "Data Source Types" --> "VMware vCenter" as an example. This one script updates several dictionary objects at one time. Note some of the tab delimited CSV files it creates have \N as the first column, while others use a unique identifier like the Host object ($hostFile) starts out with a $hostId that it gets from the (object returned from Get-VMHost)'s Id.GetHashCode() call. If you look at the Host dictionary object, there is no HostID listed. The dictionary object starts with the 2nd column in the CSV, the Name parameter.
I'm getting a 'Error running data acquisition script: prefix string too short' error when i added the csv file as a datasource. i followed all the steps provided in the Video, but at last it failed. Can you please help?
I have not run into this error before. Have you tried to follow the steps in the video with no customization to ensure that you have them all? I covered all of the steps (https://communities.netapp.com/message/107420#107420) in an earlier part of this thread. The script that I used was very simple. It had WFA copy the csv file (Tab delimited) to the tmp location (%INSTALLDIR%\server\jboss\tmp\wfa) and then import. The script was pretty basic. The dictionary and the csv file needed to be the same name and you need to ensure that there are an equal number of tabs (including the first \N for the primary key) for every dictionary row.
It might help to provide a sample of what you did in an effort to better understand the current issue.