Hi All,
I have added the following columns in the mapper file.
<COLUMN name="DateTimeStamp"> <PATH syntax="XPathENR">/{1}ODM/{1}ClinicalData/{1}SubjectData/{1}AuditRecord/{1}DateTimeStamp</PATH> <TYPE>numeric</TYPE> <DATATYPE>datetime</DATATYPE> <FORMAT width="19">IS8601DT</FORMAT> <INFORMAT width="19">IS8601DT</INFORMAT> </COLUMN> <COLUMN name="DateTimeStamp"> <PATH syntax="XPathENR">/{1}ODM/{1}ClinicalData/{1}SubjectData/{1}StudyEventData/{1}FormData/{1}ItemGroupData/{1}ItemData/{1}AuditRecord/{1}DateTimeStamp</PATH> <TYPE>numeric</TYPE> <DATATYPE>datetime</DATATYPE> <FORMAT width="19">IS8601DT</FORMAT> <INFORMAT width="19">IS8601DT</INFORMAT> </COLUMN>
Here instead of getting the second column in DateTimeStamp it creates a new column.
Is there any way we can map 2 XPATHS to one Column name?
Thank you in Advance.
If you just calculate
DateTimeStamp=coalescec( of DateTimeStamp1 - DateTimeStamp5 );
drop DateTimeStamp1 - DateTimeStamp5 ;
when reading the XML file, you'll have just one step and the lowest possible IOs.
Is there any way we can map 2 XPATHS to one Column name?
I am no expert, but not as far as I know.
The reason I am looking for this solution is I have the {1}AuditRecord element in multiple places in the clinical data hierarchy.
So instead of creating multiple tables, I want to some how extract the data in the same columns.
It will reduce 25 columns to 5 columns.
Thank you in Advance.
Can't you just read DateTimeStamp1, DateTimeStamp2 ... from the different locations and derive DateTimeStamp=coalescec( DateTimeStamp1, DateTimeStamp2, etc )
?
That is also doable, we will have 5 datetime columns, we wanted 1 column so:
1. Not to select 4 additional columns (reduce writing time)
2. Do a collase to create the final datetime column (reduce processing time).
3. We have 5 of these type of columns (transactionid, user, location, source, actionname and datetimestamp) so it becomes 25 columns in place of just 5.
All this to reduce IO usage.
If you just calculate
DateTimeStamp=coalescec( of DateTimeStamp1 - DateTimeStamp5 );
drop DateTimeStamp1 - DateTimeStamp5 ;
when reading the XML file, you'll have just one step and the lowest possible IOs.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.