Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Master II
Master II

Loop and sync Tables

Hi All,

Please advise me how to remove sync keys and loop.

Thanks in advance.

fact_sales_detail:

LOAD price_type_id,

     id_price_type_dim,

     id_promotion_dim,

     id_customer_dim,

     id_date_dim,

     id_outlet_dim,

     trxdate,

     sales_pos_id,

     product_id,

     quantity,

     cost_value,

     price,

     price_without_tax,

     price_type,

     supplier_id,

     promotion_page_type_id,

     scan_entry_id,

     sales_type_id,

     id_1,

     transaction,

     outlet_id,

     id_supplier_dim,

     id_product_dim,

     promotion_id,

     vip_card_id,

     id_generation_dim,

     id_gender_dim,

     department_id

FROM

[fact_sales_detail.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_product:

LOAD product_id,

     division_id,

     department_id,

     family_group_id,

     family_id,

     sub_family_id,

     id,

     generic_supplier_id,

     assortment_type_id

FROM

[dim_product.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_date:

LOAD year,

     month,

     date,

     day_month,

     day_week,

     week_month,

     day_year,

     id,

     month_year

FROM

[dim_date.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_department:

LOAD department_id,

     department_name_en,

     department_name_in,

    // id,

     division_id

FROM

[dim_department.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_division:

LOAD division_id,

     division_name_en,

     division_name_in

   //  id

FROM

[dim_division.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_family:

LOAD family_id,

     family_name_en,

     family_name_in,

   //  id,

     family_group_id

FROM

[dim_family.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_family_group:

LOAD family_group_id,

     family_group_name_en,

     family_group_name_in,

   //  id,

     department_id

FROM

[dim_family_group.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_outlet:

LOAD outlet_id,

     outlet_type,

     outlet_name_en,

     outlet_name_id,

     city_id,

     region,

     format_id,

     outlet_opening_date,

     outlet_closed_date,

     process_date

//    id

FROM

[dim_outlet.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

1 Solution

Accepted Solutions
Highlighted
Master II
Master II

Re: Loop and sync Tables

Hi, try now

fact_sales_detail:

LOAD price_type_id,

    id_price_type_dim,

    id_promotion_dim,

    id_customer_dim,

    id_date_dim,

    id_outlet_dim,

    trxdate,

    sales_pos_id,

    product_id,

    quantity,

    cost_value,

    price,

    price_without_tax,

    price_type,

    supplier_id,

    promotion_page_type_id,

    scan_entry_id,

    sales_type_id,

    id_1,

    transaction,

    outlet_id,

    id_supplier_dim,

    id_product_dim,

    promotion_id,

    vip_card_id,

    id_generation_dim,

    id_gender_dim

//    department_id

FROM

[fact_sales_detail.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_product:

LOAD

  product_id,

      division_id,

//    department_id,

//    family_group_id,

//    family_id,

//    sub_family_id,

      id,

      generic_supplier_id,

      assortment_type_id

FROM

[dim_product.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_date:

LOAD year,

    month,

    date,

    day_month,

    day_week,

    week_month,

    day_year,

    id,

    month_year

FROM

[dim_date.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_department:

LOAD

  department_id,

      department_name_en,

      department_name_in,

// id,

      division_id

FROM

[dim_department.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_division:

LOAD

  division_id,

      division_name_en,

      division_name_in

  //  id

FROM

[dim_division.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_family:

LOAD

  family_id,

      family_name_en,

      family_name_in,

  //  id,

      family_group_id

FROM

[dim_family.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_family_group:

LOAD

  family_group_id,

      family_group_name_en,

      family_group_name_in,

  //  id,

      department_id

FROM

[dim_family_group.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_outlet:

LOAD outlet_id,

    outlet_type,

    outlet_name_en,

    outlet_name_id,

    city_id,

    region,

    format_id,

    outlet_opening_date,

    outlet_closed_date,

    process_date

//    id

FROM

[dim_outlet.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

View solution in original post

4 Replies
Highlighted
Master II
Master II

Re: Loop and sync Tables

Hi, try now

fact_sales_detail:

LOAD price_type_id,

    id_price_type_dim,

    id_promotion_dim,

    id_customer_dim,

    id_date_dim,

    id_outlet_dim,

    trxdate,

    sales_pos_id,

    product_id,

    quantity,

    cost_value,

    price,

    price_without_tax,

    price_type,

    supplier_id,

    promotion_page_type_id,

    scan_entry_id,

    sales_type_id,

    id_1,

    transaction,

    outlet_id,

    id_supplier_dim,

    id_product_dim,

    promotion_id,

    vip_card_id,

    id_generation_dim,

    id_gender_dim

//    department_id

FROM

[fact_sales_detail.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_product:

LOAD

  product_id,

      division_id,

//    department_id,

//    family_group_id,

//    family_id,

//    sub_family_id,

      id,

      generic_supplier_id,

      assortment_type_id

FROM

[dim_product.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_date:

LOAD year,

    month,

    date,

    day_month,

    day_week,

    week_month,

    day_year,

    id,

    month_year

FROM

[dim_date.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_department:

LOAD

  department_id,

      department_name_en,

      department_name_in,

// id,

      division_id

FROM

[dim_department.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_division:

LOAD

  division_id,

      division_name_en,

      division_name_in

  //  id

FROM

[dim_division.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_family:

LOAD

  family_id,

      family_name_en,

      family_name_in,

  //  id,

      family_group_id

FROM

[dim_family.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_family_group:

LOAD

  family_group_id,

      family_group_name_en,

      family_group_name_in,

  //  id,

      department_id

FROM

[dim_family_group.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

dim_outlet:

LOAD outlet_id,

    outlet_type,

    outlet_name_en,

    outlet_name_id,

    city_id,

    region,

    format_id,

    outlet_opening_date,

    outlet_closed_date,

    process_date

//    id

FROM

[dim_outlet.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

View solution in original post

Highlighted
MVP
MVP

Re: Loop and sync Tables

1) Comment department_id from  dim_family_group Table

2) Comment division_id from dim_department Table

3) Comment family_group_id  and department_id from dim_product Table

Highlighted
MVP & Luminary
MVP & Luminary

Re: Loop and sync Tables

Hi,

Try like this

Comment division_id from Dim_Department so that Synthetic Key 3 will be gone.

Comment department_id from dim_family_group table so that Synthetic Key 2 will be gone.

Comment family_group_id in dim_family table so that Synthetic Key 1 will be gone.

Comment department_id in dim_product table.so that Synthetic Key 4 will be gone.

If you remove 1,2,3,4 automatically 5 will be gone.

Regards,

Jagan.

Highlighted
Master II
Master II

Re: Loop and sync Tables

Thank you all for your answers. All are correct.