Highlighted
New Contributor

import query c sharp dimension in the target module do not match the import definition

anaplan error.JPG

What does that mean?  Something isn't importing from my sql query.  

13 REPLIES 13
Highlighted
Certified Master Anaplanner

Re: import query c sharp dimension in the target module do not match the import definition

For the import action you are trying to run, is it importing from a file to a module or from another module/saved view to a module? Are you able to run the action directly from the Anaplan interface (i.e. try to publish it to a dashboard and press the button) without issue?

Highlighted
New Contributor

Re: import query c sharp dimension in the target module do not match the import definition

maperror.JPG

 

Does that red mean it isn't mapping correctly?  

Highlighted
Certified Master Anaplanner

Re: import query c sharp dimension in the target module do not match the import definition

No, the red doesn't necessarily mean it's wrong. Each dimension just gets a different color-coding.

 

I would check the line items tab (the third one). Can you provide a screenshot of what that looks like?

 

Is this an import from a file or from another module? And if you run it from Anaplan (not via C#), do you receive any errors? If so, what errors do you get, can you provide a screenshot?

Highlighted
New Contributor

Re: import query c sharp dimension in the target module do not match the import definition

This is an import into the Anaplan Module.  The c# runs and populates a temp csv file.  However this information is not being loaded back into Anaplan.  I then reimported the temp csv file back into Anaplan which works.  However the SQL query seemed to be unsuccessful...

 

SQLQuery" value= "SELECT ROW_NUMBER() OVER (ORDER BY DATAAREAID) AS 'Row ID','Actual' AS 'Version',CONVERT(VARCHAR(10), DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0), 101) AS 'Date', UPPER([DATAAREAID]) AS 'Company',[DIMENSION2_] AS 'P&C Code (Market)' , [DIMENSION3_] AS 'AX Code' ,[DIMENSION4_] AS 'Customer Account' , [ACCOUNTNUM] AS 'GL Account',[DIMENSION8_] AS 'SyRUS Code' , CAST(SUM([DEBITMST]+ [CREDITMST]) AS CHAR) AS 'Amount', [DIMENSION7_] AS 'Project Code' ,[DIMENSION5_] AS 'Category' ,[DIMENSION9_] AS 'Intercompany' FROM [PCIS_AX2009_BEN].[dbo].[LEDGERBALANCESDIMTRANS] WHERE [DATAAREAID] = 'BCUS' AND [PERIODCODE] = '1' AND [TRANSDATE] >= DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0) AND [TRANSDATE] < DATEADD(mm, DATEDIFF(m,0,GETDATE()),0) GROUP BY [DATAAREAID],[DIMENSION2_],[DIMENSION3_],[DIMENSION4_], [ACCOUNTNUM],[DIMENSION8_],[DIMENSION7_],[DIMENSION5_],[DIMENSION9_]"anaplanlineitem.JPGanaplanimportsuccess.JPGsqlerror.JPG

Highlighted
Certified Master Anaplanner

Re: import query c sharp dimension in the target module do not match the import definition

So, the C# query that you wrote creates a .csv file and then you manually load that file into Anaplan? Or does the C# query have two steps: create file and then load file?

 

 

Highlighted
New Contributor

Re: import query c sharp dimension in the target module do not match the import definition

Hi Yes.  first c# creates the temp csv file which shows all of the data (and that means it's a good sign).  Then it imports all of the dating using the Anaplan action.  I am not sure if it has something to do with the sql query.  I had to tweak the sql query for the P&C field and the date criteria because c# didn't like the original query.

 

This isn't the full query.  I have the full query in the previous thread but These two were giving me issues previously.  I am not sure if this is still the cause of the issue or if it is something else

 

SELECT[DIMENSION2_] AS 'P&C Code (Market)' , [ FROM [abc].[dbo].[blahblah] WHERE [TRANSDATE] >= DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0) AND [TRANSDATE] < DATEADD(mm, DATEDIFF(m,0,GETDATE()),0) 

Highlighted
Certified Master Anaplanner

Re: import query c sharp dimension in the target module do not match the import definition

I don't really know anything about C#, so I can't really help there.

 

From an Anaplan perspective, I would try the following:

  1. Test the file creation & action
    • Run the steps that create the csv file
    • Make sure the import action you created in Anaplan is published to a dashboard
    • Press the button, navigate to the file created above (you shouldn't be prompted for any additional information other than file location), and attempt to load. See if any errors are produced. 
  2. Assuming all steps in step 1 work, then I'd check the following:
    • Name of the file being produced via the C# process vs the name of the file used to originally create the action. We use Anaplan Connect and sometimes a mismatch here causes issues. You can check the name of the file on the imports screen.
  3. If the file names match exactly, and the action runs manually without issue, then it seems likely it's a C# issue and not an issue with Anaplan. I'm not sure where to go from there but perhaps someone else here will be able to chime in with additional information. 
Highlighted
Master Anaplanner/Community Boss

Re: import query c sharp dimension in the target module do not match the import definition

@Valeria 

Agree with @bdeaton

You may want to manually run the import first inside of Anaplan to make sure there aren't any issues.

The errors you're getting suggest to me that there's a mapping issue.

It's also possible that the default import file has changed or is not available because it wasn't imported as "everyone" or "admin". If the file was imported as "private" there's a 48 hour limit of non-use before it deletes automatically.

Best suggestion, honestly, is to run it manually in Anaplan. At the very least "edit" the action to see if the mapping is still working.


Jared Dolich
Highlighted
New Contributor

Re: import query c sharp dimension in the target module do not match the import definition

Hi,

I cant' edit the action since it is no longer available.  If it is no longer available.  How do I remap it?