Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/more resilient element checks #413

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 56 additions & 38 deletions main/}bedrock.cube.data.import.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
586,"C:\TM1\Bedrock\Data\Bedrock.Z.Cube.Placeholder.csv"
585,"C:\TM1\Bedrock\Data\Bedrock.Z.Cube.Placeholder.csv"
564,
565,"e^1a7ajj]3`9fsVlFlT?MYt;eyG[o7fY2o?3:?8BsQ`qtv>AfTwZswuG[9MEMm`6z]\f=wlR2XAps6a<XDA;9H3d5xd?k0ey\9HHqXxC<nHklcTi1kT3Tsc1?3J]NWKfZt8?50X0`xWiiz@Z63Cdd0Dz00vMeBc6aB[DuDvvl=Xt?^\3ZmyIzdwAk=F4:=o;F9jnAI_W"
565,"yJlAgUbxOYI4lS;MpLIE]=epDaPnb[sdi1xW;ZWYZ0C@\x;TjMoqliu>9L@Y4J0Y6[Z__46EZL]?m5BpCu57r4`so7gXQaEDjpOuCm\q><6baLZxY07]QRgo[IvD6nrDh6U?@shGPMH0ZCJxG`9Dvn[dE9JDVtwWl5fi:kV<^y=1[lQPEUdVsCVjFmLic7Dat=A\[X9Q"
559,1
928,0
593,
Expand Down Expand Up @@ -125,7 +125,7 @@ pEleDelim,"OPTIONAL: Delimiter between elements"
pCharacterSet,"OPTIONAL: The output character set (defaults to TM1CS_UTF8 if blank)"
pFileDelete,"OPTIONAL: Delete the source file on conclusion of import (Boolean 1/0, default = 0)"
pSkipInvalidRecords,"OPTIONAL: Skip records with invalid elements rather than creating error log"
577,30
577,33
v1
v2
v3
Expand Down Expand Up @@ -156,7 +156,10 @@ v27
v28
v29
v30
578,30
NVALUE
SVALUE
VALUE_IS_STRING
578,33
2
2
2
Expand Down Expand Up @@ -187,7 +190,10 @@ v30
2
2
2
579,30
1
2
1
579,33
1
2
3
Expand Down Expand Up @@ -218,7 +224,12 @@ v30
28
29
30
580,30
0
0
0
580,33
0
0
0
0
0
Expand Down Expand Up @@ -249,7 +260,11 @@ v30
0
0
0
581,30
0
581,33
0
0
0
0
0
0
Expand Down Expand Up @@ -331,7 +346,7 @@ EndIf;
#****End: Generated Statements****

#################################################################################################
##~~Join the bedrock TM1 community on GitHub https://github.com/cubewise-code/bedrock Ver 4.0~~##
##~~Join the bedrock TM1 community on GitHub https://github.com/cubewise-code/bedrock Ver 4.1.4~~##
#################################################################################################

#Region @DOC
Expand Down Expand Up @@ -686,33 +701,33 @@ If( nErrors <> 0 );
EndIf;

### Determine dimensions in target cube, we need to know this to test cell type before loading ###
sDim1 = TabDim( pCube, 1 );
sDim2 = TabDim( pCube, 2 );
sDim3 = TabDim( pCube, 3 );
sDim4 = TabDim( pCube, 4 );
sDim5 = TabDim( pCube, 5 );
sDim6 = TabDim( pCube, 6 );
sDim7 = TabDim( pCube, 7 );
sDim8 = TabDim( pCube, 8 );
sDim9 = TabDim( pCube, 9 );
sDim10 = TabDim( pCube, 10 );
sDim11 = TabDim( pCube, 11 );
sDim12 = TabDim( pCube, 12 );
sDim13 = TabDim( pCube, 13 );
sDim14 = TabDim( pCube, 14 );
sDim15 = TabDim( pCube, 15 );
sDim16 = TabDim( pCube, 16 );
sDim17 = TabDim( pCube, 17 );
sDim18 = TabDim( pCube, 18 );
sDim19 = TabDim( pCube, 19 );
sDim20 = TabDim( pCube, 20 );
sDim21 = TabDim( pCube, 21 );
sDim22 = TabDim( pCube, 22 );
sDim23 = TabDim( pCube, 23 );
sDim24 = TabDim( pCube, 24 );
sDim25 = TabDim( pCube, 25 );
sDim26 = TabDim( pCube, 26 );
sDim27 = TabDim( pCube, 27 );
sDim1 = TabDim( pCube, 1 ); If( HierarchyExists(sDim1, 'Leaves') = 1); sDim1 = Expand('%sDim1%:Leaves'); EndIf;
sDim2 = TabDim( pCube, 2 ); If( HierarchyExists(sDim2, 'Leaves') = 1); sDim2 = Expand('%sDim2%:Leaves'); EndIf;
sDim3 = TabDim( pCube, 3 ); If( HierarchyExists(sDim3, 'Leaves') = 1); sDim3 = Expand('%sDim3%:Leaves'); EndIf;
sDim4 = TabDim( pCube, 4 ); If( HierarchyExists(sDim4, 'Leaves') = 1); sDim4 = Expand('%sDim4%:Leaves'); EndIf;
sDim5 = TabDim( pCube, 5 ); If( HierarchyExists(sDim5, 'Leaves') = 1); sDim5 = Expand('%sDim5%:Leaves'); EndIf;
sDim6 = TabDim( pCube, 6 ); If( HierarchyExists(sDim6, 'Leaves') = 1); sDim6 = Expand('%sDim6%:Leaves'); EndIf;
sDim7 = TabDim( pCube, 7 ); If( HierarchyExists(sDim7, 'Leaves') = 1); sDim7 = Expand('%sDim7%:Leaves'); EndIf;
sDim8 = TabDim( pCube, 8 ); If( HierarchyExists(sDim8, 'Leaves') = 1); sDim8 = Expand('%sDim8%:Leaves'); EndIf;
sDim9 = TabDim( pCube, 9 ); If( HierarchyExists(sDim9, 'Leaves') = 1); sDim9 = Expand('%sDim9%:Leaves'); EndIf;
sDim10 = TabDim( pCube, 10 ); If( HierarchyExists(sDim10, 'Leaves') = 1); sDim10 = Expand('%sDim10%:Leaves'); EndIf;
sDim11 = TabDim( pCube, 11 ); If( HierarchyExists(sDim11, 'Leaves') = 1); sDim11 = Expand('%sDim11%:Leaves'); EndIf;
sDim12 = TabDim( pCube, 12 ); If( HierarchyExists(sDim12, 'Leaves') = 1); sDim12 = Expand('%sDim12%:Leaves'); EndIf;
sDim13 = TabDim( pCube, 13 ); If( HierarchyExists(sDim13, 'Leaves') = 1); sDim13 = Expand('%sDim13%:Leaves'); EndIf;
sDim14 = TabDim( pCube, 14 ); If( HierarchyExists(sDim14, 'Leaves') = 1); sDim14 = Expand('%sDim14%:Leaves'); EndIf;
sDim15 = TabDim( pCube, 15 ); If( HierarchyExists(sDim15, 'Leaves') = 1); sDim15 = Expand('%sDim15%:Leaves'); EndIf;
sDim16 = TabDim( pCube, 16 ); If( HierarchyExists(sDim16, 'Leaves') = 1); sDim16 = Expand('%sDim16%:Leaves'); EndIf;
sDim17 = TabDim( pCube, 17 ); If( HierarchyExists(sDim17, 'Leaves') = 1); sDim17 = Expand('%sDim17%:Leaves'); EndIf;
sDim18 = TabDim( pCube, 18 ); If( HierarchyExists(sDim18, 'Leaves') = 1); sDim18 = Expand('%sDim18%:Leaves'); EndIf;
sDim19 = TabDim( pCube, 19 ); If( HierarchyExists(sDim19, 'Leaves') = 1); sDim19 = Expand('%sDim19%:Leaves'); EndIf;
sDim20 = TabDim( pCube, 20 ); If( HierarchyExists(sDim20, 'Leaves') = 1); sDim20 = Expand('%sDim20%:Leaves'); EndIf;
sDim21 = TabDim( pCube, 21 ); If( HierarchyExists(sDim21, 'Leaves') = 1); sDim21 = Expand('%sDim21%:Leaves'); EndIf;
sDim22 = TabDim( pCube, 22 ); If( HierarchyExists(sDim22, 'Leaves') = 1); sDim22 = Expand('%sDim22%:Leaves'); EndIf;
sDim23 = TabDim( pCube, 23 ); If( HierarchyExists(sDim23, 'Leaves') = 1); sDim23 = Expand('%sDim23%:Leaves'); EndIf;
sDim24 = TabDim( pCube, 24 ); If( HierarchyExists(sDim24, 'Leaves') = 1); sDim24 = Expand('%sDim24%:Leaves'); EndIf;
sDim25 = TabDim( pCube, 25 ); If( HierarchyExists(sDim25, 'Leaves') = 1); sDim25 = Expand('%sDim25%:Leaves'); EndIf;
sDim26 = TabDim( pCube, 26 ); If( HierarchyExists(sDim26, 'Leaves') = 1); sDim26 = Expand('%sDim26%:Leaves'); EndIf;
sDim27 = TabDim( pCube, 27 ); If( HierarchyExists(sDim27, 'Leaves') = 1); sDim27 = Expand('%sDim27%:Leaves'); EndIf;

### Placeholders for mappped dimensions and for new dimensions

Expand Down Expand Up @@ -1317,11 +1332,13 @@ DatasourceASCIIQuoteCharacter = pQuote;
SetInputCharacterSet (pCharacterSet);

### End Prolog ###
573,3
573,4

#****Begin: Generated Statements***
#****End: Generated Statements****

574,1104
574,1105

#****Begin: Generated Statements***
#****End: Generated Statements****

Expand Down Expand Up @@ -2426,7 +2443,8 @@ ElseIf( nDimensionCount = 27 );
## Increase Record count
nRecordPostedCount = nRecordPostedCount + 1;
### End Data ###
575,44
575,45

#****Begin: Generated Statements***
#****End: Generated Statements****

Expand Down Expand Up @@ -2471,7 +2489,7 @@ Else;
EndIf;

### End Epilog ###
576,_ParameterConstraints=e30=
576,CubeAction=1511 DataAction=1503 CubeLogChanges=0 _ParameterConstraints=e30
930,0
638,1
804,0
Expand Down