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

GET DIRECT DATA fails when its dimension is mapped #145

Closed
ToddFincannon opened this issue Oct 19, 2021 · 1 comment · Fixed by #146 or #190
Closed

GET DIRECT DATA fails when its dimension is mapped #145

ToddFincannon opened this issue Oct 19, 2021 · 1 comment · Fixed by #146 or #190
Assignees
Labels
Milestone

Comments

@ToddFincannon
Copy link
Collaborator

GET DIRECT DATA fails when there is a mapped dimension serving as an alias to the LHS dimension. For instance:

DimA <-> DimM ~~|
DimM: M1, M2, M3 ~~|
m[DimM] = GET DIRECT DATA( 'm.csv', ',', '1', 'B2' ) ~~|

The data is read from the file and converted into a lookup for each index in the dimension. The indices are separated before the code generation phase where this happens. Because of the dimension mapping, the subscript family of the lookup indices is set to the mapped dimension. The result is that first row of the CSV file is written for every index in the LHS dimension.

The mapped dimension must have a name that comes before the LHS dimension in an alpha sort.

@ToddFincannon ToddFincannon added this to the 0.6.0 milestone Oct 19, 2021
@ToddFincannon ToddFincannon self-assigned this Oct 19, 2021
@ToddFincannon ToddFincannon changed the title GET DIRECT DATA fails when its dimension is mapped GET DIRECT DATA fails when its dimension is mapped Oct 19, 2021
@ToddFincannon
Copy link
Collaborator Author

In this situation, the mapped dimension has the same indices as the LHS dimension but is a copy, so it's not actually mapped. We can find the LHS dimension that includes the index by a direct check against the dimension's indices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment