Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour ,
Je suis nouveau sur Qlik sense.
Mon problème c'est que je ne peux pas juger si mon modèle de données est fiable ou non fiable. surtout que pour le moment, dans mon modèle je n'ai que des tables de dimension (FACTS) ce qui me pose des doutes.
[VM]:
LOAD
[ID_VM],
[ID_MISSION] AS [VM.ID_MISSION],
[ID_MISSION_VM] AS [VM.ID_MISSION_VM],
[NUM_SEQUENCE],
[ETAT] AS [VM.ETAT],
[TYPE_ALLEE],
[TYPE_POSTE],
[ID_POSTE],
[ZONE],
[NIVEAU] AS [VM.NIVEAU],
[ALLEE],
[COLONNE],
[INDICE],
[ID_PALETTE] AS [VM.ID_PALETTE],
[BATTERIE],
[LIEU_BATT],
[TEMPS_BATT];
SELECT "ID_VM",
"ID_MISSION",
"ID_MISSION_VM",
"NUM_SEQUENCE",
"ETAT",
"TYPE_ALLEE",
"TYPE_POSTE",
"ID_POSTE",
"ZONE",
"NIVEAU",
"ALLEE",
"COLONNE",
"INDICE",
"ID_PALETTE",
"BATTERIE",
"LIEU_BATT",
"TEMPS_BATT"
FROM "$(dbTableOwner)"."VM";
[HISTO_ETAT_VM_SECU]:
LOAD
[ID_VM] ,
[ANCIEN_STATUT] ,
[NOUVEAU_STATUT] ,
[EN_AUTO] ,
[COM_MITSU] ,
[DMD_VALIDE],
[VALIDE],
[FIGE] ,
[DEBUT_CHGT] ,
[DUREE],
[DATE_MODIF];
SELECT "ID_VM",
"ANCIEN_STATUT",
"NOUVEAU_STATUT",
"EN_AUTO",
"COM_MITSU",
"DMD_VALIDE",
"VALIDE",
"FIGE",
"DEBUT_CHGT",
"DUREE",
"DATE_MODIF"
FROM "$(dbTableOwner)"."HISTO_ETAT_VM_SECU";
/******************** FACTS *********************************************************************************************************************************/
KPI_VM:
sql select vm.id_vm, h.ancien_statut as NB_STOPS_PER_VM,h.date_modif
from histo_etat_vm_secu h
inner join vm on h.id_vm = vm.id_vm
where h.nouveau_statut in (8,0) and h.ancien_statut not in (0,8);
Join
//temps_arret_vm:
sql select id_vm,duree as downtime_vm,h.date_modif
from histo_etat_vm_secu h
where nouveau_statut in (0,8) and ancien_statut in (2,0,8);
//temps_total_arrets_vm: Meme requete +group by
join
//nb_figeage_VM:
sql select id_vm, ancien_statut as NB_FIGE_PER_VM,h.date_modif
from histo_etat_vm_secu h
where nouveau_statut in (4) and ancien_statut not in (0,8);
join
//temps_figeage_VM:
sql select id_vm,duree as time_fige_vm,h.date_modif
from histo_etat_vm_secu h
where nouveau_statut in (2,4) and ancien_statut in (2,4);
join
//DISPO_par_vm:
sql select id_vm, sum(duree) as downtime_dispo_vm,
case
when (24*60*60*30-sum(round(duree)))<0
then 0
else round(((24*60*60*30-sum(round(duree)))/(24*60*60*30))*100,2)
end as dispo_vm
from histo_etat_vm_secu
where (((nouveau_statut in (0,8) and ancien_statut in (2,0,8))
or (nouveau_statut in (2,4) and ancien_statut in (2,4)))
and trunc(date_modif)>=trunc(sysdate)-30)
group by id_vm
order by id_vm;
Drop table HISTO_ETAT_VM_SECU;
Drop table VM;
normalement c'est bon sauf la partie dont je t'ai mentionné ,par exemple Date modif ...
normalement c'est bon sauf la partie dont je t'ai mentionné ,par exemple Date modif ...