cancel
Showing results for 
Search instead for 
Did you mean: 

xMII File I/O Importing .CSV file and mapping to columns for querie

Former Member
0 Kudos

Hi,

I am new to xMII and my first assignment is to import a .CSV file using file I/O in the BLS editor and then use that transaction as a data source for a Xacute query. I am able to import the file using the "Get File List", "Text Loader and "Text Saver" functions. After that I parse the file using the "Flat File Parser" function.

At this point I get stuck as I am trying to map the respective fields on the flat file delimited by commas, to their respective columns as identified in the Illuminator Doc.

Please advise as to how I can assign the data delimited by commas to their respective columns. I tried a "Repeater" action block with a "Row" action block that reference the Illuminator Doc but get an invalid Assignment Target error.

Any help will be greatly appreciated

Thanks!

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Theo

Carolina 1991

tbenschatfaritec.com

Former Member
0 Kudos

Thanks for the info Michael

Unfortunately I did all the checks from your email as well but still have the problem.

Former Member
0 Kudos

I defiined all columns as type string so there should be no issue with type as far as I understand.

I have run out of ideas...

agentry_src
Active Contributor
0 Kudos

When you have an invalid assignment, it means that xMII can't find the action block or field name you are trying to reference. Is your Row action block named IlluminatorRow or something else. If it is something else, rename your mapping to the correct name. An easy way to check if you have mapped one field on the left to one field on the right is to simply highlight the link. If xMII can find both items, it will expand the source and receiving fields.

There are occasions where renaming does not propagate all the way through the transaction. So you may have to manually update the linkages.

Hope that helps,

Mike

Former Member
0 Kudos

Hi Christian,

All seems to be fine right up to the last step where I setup the links in the IlluminatorRow action block.

Target XPath:

IlluminatorRow.Column1

Expression:

StringListToXml.Output{Rowsets/Rowset/Row[1]/Item

I follow this format(suggested by you) for each column defined in the Illuminator doc. When I test the transaction though I get the following error:

Invalid Assignment Target: IlluminatorRow.Column1

Any ideas?

Thanks

Former Member
0 Kudos

Did you try to put a character into a numeric?

Former Member
0 Kudos

Hi Christian,

Thanks for the info. This is quite a learning curve for me - would have been no problem in ABAP;o). Just to help me understand - here is the flow of my action blocks:

Sequence 1

Get File List

Illuminator Doc (I specify the columns here for the query)

Sequence 2

Text Loader

Sequence 3

Text Saver (Saving the text file here to an archive directory)

Sequence 4

Flat File Parser

Sequence 5

Repeater (Looping at the parsed flat file in Sequence 4)

Sequence 6

String list to XML???

Sequence 7

ROW (pointing to the Illuminator Doc)???

Sequence 8

Assignment???

I am not sure if I am using the correct action blocks.

Can you please advise the correct sequence of the action blocks as well as the configuration from Sequence 6-8?

Thanks

Former Member
0 Kudos

Looks good. You don't need #8 number to get the data into the illum doc.

Former Member
0 Kudos

Thanks Christian,

I am assuming you are saying I should use a repeater action block with a String List to xml action block?

If my string list looks like this:

FieldA,FieldB,FieldC

And my Illuminator doc is configured as:

HeadingA

HeadingB

HeadingC

How do I manage to assign the contents of FieldA to HeadingA etc? Is this done individually for each column on the query, or is that logic built into BLS i.e. it automatically assign the first field to the first column specified?

Former Member
0 Kudos

once you have a row of comma delimited fields you can pass it the the string list to XML. The output of the string list to XML action should give you a document were each column has a row, e.g

Input = FieldA,FieldB,FieldC

Output =<Rowset>

<Row>FieldA</Row>

<Row>FieldB</Row>

<Row>FieldC</Row>

</Rowset>

You can then get the columns you want directly:

GET_ROW_DATA.Output{/Rowsets/Rowset/Row[1]/Item} is FieldA

GET_ROW_DATA.Output{/Rowsets/Rowset/Row[2]/Item} is FieldB

GET_ROW_DATA.Output{/Rowsets/Rowset/Row[3]/Item} is FieldC

Former Member
0 Kudos

String List to xml