Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to resolve this loop?

Hi all,

I am facing this issue and could not resolve. Appreciate if someone can guide me along.

Basically, I have tried to create key between various tables hoping that it could synchronize the data but it failed.

If I add in the 2 fields (Attribute 1 and 2), then it fails. Otherwise, it works.

Really need to know the walk around for this, thanks.

Below is the scenario:-

ActualSalesTable:

LOAD

     Store,

     Item,

     ActualSales,

     Date,

SQL SELECT *

FROM $(DB)$(Comp1)$ActualSalesTable";

ItemTable:

LOAD

     Item,

     Attribute1,

     Attribute2,

SQL SELECT *

FROM $(DB)$(Comp1)$ItemTable";

FiscalYearTable:

LOAD

     Date,

     Day,

     Week,

     Month,

     Year,

     YearWeek

FROM Excel;

BudgetSalesTable: (OK)

LOAD

     Year,

     Week,

     BudgetSales,

     YearWeek

FROM Excel;

BudgetSalesTable: (NOT OK AFTER ADDING IN Attribute 1 and 2 -> Failed to synchronize due to loops)

LOAD

     Year,

     Week,

     Attribute1,

     Attribute2,

     BudgetSales,

     YearWeek,

FROM Excel;

8 Replies
Anonymous
Not applicable
Author

Try this

LOAD

     Year,

     Week,

     Attribute1 as Att1,

     Attribute2 as Att,

  BudgetSales,

     YearWeek,

FROM Excel;

Not applicable
Author

Hi Jebamalai,

Thanks for the reply. I have tried but it reloads properly without any loop issue but not what I want.

This is because the Attribute1 and Attribute2 are part of the important fields in the item master table.

I only change at the BudgetSalesTable but not ItemTable though.

Anonymous
Not applicable
Author

Then can you try to Quality the fields

senpradip007
Specialist III
Specialist III

Try this:

ActualSalesTable:

LOAD

     'Actual' As Source,

     Store,

     Item,

     ActualSales,

     Date,

SQL SELECT *

FROM $(DB)$(Comp1)$ActualSalesTable";

BudgetSalesTable:

LOAD

     'Budget' As Source,

     Year,

     Week,

     Attribute1,

     Attribute2,

     BudgetSales,

     YearWeek,

FROM Excel;

gines_rueda
Contributor III
Contributor III

I think the main issue is a cyclic relation against FiscalYearTable.

You could try to change

ActualSalesTable

Date to ActualSalesDate


and then create a different calendar.


Cheers.

Not applicable
Author

Hi all, thanks for the replies.

Jebamalai,

What do you mean by Quantity the field? Do you mean single code or something?

Pradip Sen,

I have tried using your method but what field should I be taking from the 2 tables to link up as source?

Gines Rueda,

Yes, I believe so but it is not a 1 table to 1 table, I think here they are 3 tables involved so even if I change the date to ActualSalesDate, I need to lookup from another table for the Attributes on Item Master.

I have seen people using the below command. Will that help and how should I be coding it?

left join <>

resident <>

DROP <>

Anonymous
Not applicable
Author

Sorry.It was Qualify

Qualify 'Att*'

senpradip007
Specialist III
Specialist III

ActualSalesTable:

LOAD

     'Actual' As Source,

     Store,

     Item,

     ActualSales,

     Date,

SQL SELECT *

FROM $(DB)$(Comp1)$ActualSalesTable";

Concatenate(ActualSalesTable)

LOAD

     'Budget' As Source,

     MakeWeekDate(Year,Week,1) As Date,

     Attribute1 AS Item,

     BudgetSales

FROM Excel;

Create a Master Calendar.