importing duplicate detail-data into Module.....

zbeat
Occasional Contributor

importing duplicate detail-data into Module.....

I want to import duplicate detail-data into Module.....

When I imported, same departmentcode data which is second same data was rejected.....

dimension(departmentcode) is Fixed and unchangeable, How can I do this?

2 REPLIES 2
alexpavel
Certified Master Anaplanner

Re: importing duplicate detail-data into Module.....

What dimensions do you have in the Target module? Only Department? is a numbered list?

 

Normally, it is possible to create a numbered list with the unique combinations of Department and Department Type (Fixed or unchangeable) where Department and Department Type are properties in that list. 

 

Hope it helps

Alex

 

Lam120
Not applicable

Re: importing duplicate detail-data into Module.....


@mcdvoice wrote:

I want to import duplicate detail-data into Module.....

When I imported, same departmentcode data which is second same data was rejected.....

dimension(departmentcode) is Fixed and unchangeable, How can I do this?


The difference between import module and from module import foo is mainly subjective. Pick the one you like best and be consistent in your use of it. Here are some points to help you decide.

import module

Pros:
Less maintenance of your import statements. Don't need to add any additional imports to start using another item from the module
Cons:
Typing module.foo in your code can be tedious and redundant (tedium can be minimized by using import module as mo then typing mo.foo)
from module import foo

Pros:
Less typing to use foo
More control over which items of a module can be accessed
Cons:
To use a new item from the module you have to update your import statement
You lose context about foo. For example, it's less clear what ceil() does compared to math.ceil()
Either method is acceptable, but don't use from module import *.

For any reasonable large set of code, if you import * you will likely be cementing it into the module, unable to be removed. This is because it is difficult to determine what items used in the code are coming from 'module', making it easy to get to the point where you think you don't use the import any more but it's extremely difficult to be sure.