Академический Документы
Профессиональный Документы
Культура Документы
For testing:
export CASSANDRA_HOME=/opt/dsa/fur/cassadsa-3.10
export PYTHON_HOME=/opt/dsa/fur/packages/Python27
export JAVA_HOME=/opt/dsa/fur/packages/jdk1.8.0_112
export PATH=$JAVA_HOME/bin:$CASSANDRA_HOME/bin:$PYTHON_HOME/bin:$PATH
command to connect cassendra DB :
cqlsh -u cassandra -p cassandra
use cassadsa;
cassandra@cqlsh>describe tables;
cassandra@cqlsh>describe keyspaces;
cassandra@cqlsh>describe table cassadsa;
cassandra@cqlsh>help use;
..............................
For Production:
ssh dsatm@10.88.24.28
[dsatm@inmumcld1dsa11 ~]$ cqlsh -u evolms -p 3voLm3
Connected to DSA at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.10 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
evolms@cqlsh> use cassadsa;
evolms@cqlsh:cassadsa> desc tables
sims imsit_recycle release_imsi sim_map
evolms@cqlsh> select
iccid,imsi_t,imsi_d,imsi_circle_id,state,processtype,requesttype from
cassadsa.sim_map where last_updated_timestamp>= '2018-01-17' allow filtering;
success So's:----
SQL> select count(*), SOTYPE from dsatm.sorecord where soid in ( select soid from
dsatm.sotransaction where slestate!='SUCCESS') and
to_char(RECEIPTTIMESTAMP+5.5/24,'YYYYMMDD')=to_char(sysdate,'YYYYMMDD') and SOTYPE!
='getCircleID' group by SOTYPE;
SQL> select count(*), SOTYPE from dsatm.sorecord where soid in ( select soid from
dsatm.sotransaction where slestate='SUCCESS') and
to_char(RECEIPTTIMESTAMP+5.5/24,'YYYYMMDD')=to_char(sysdate,'YYYYMMDD') and SOTYPE!
='getCircleID' group by SOTYPE;
(16 rows)
.........................................................
''''''''''''''''''''''''''''''''''''''''''''''''''''
Month wise: we have to give date month starting date:
.........................................................
using iccid
evolms@cqlsh:cassadsa> select
iccid,imsi_t,imsi_d,imsi_circle_id,state,processtype,requesttype from
cassadsa.sim_map where iccid='89910271001001878911' allow filtering;
(1 rows)
..................................................
Transaction status report:-
evolms@cqlsh:cassadsa> select
iccid,imsi_circle_id,state,processtype,requesttype,last_updated_timestamp,creation_
timestamp from cassadsa.sim_map where last_updated_timestamp>'2017-12-26' and
processtype='POSTPAID' and requesttype='MNP' allow filtering;
select
iccid,imsi_circle_id,state,processtype,requesttype,last_updated_timestamp,creation_
timestamp from cassadsa.sim_map where last_updated_timestamp>'2017-12-26' and
processtype='PREPAID' and requesttype='MNP' allow filtering;
evolms@cqlsh:cassadsa> select
iccid,imsi_circle_id,state,processtype,requesttype,last_updated_timestamp,creation_
timestamp from cassadsa.sim_map where last_updated_timestamp>='2017-12-30' and
processtype='POSTPAID' and requesttype='SIMEX' allow filtering;
evolms@cqlsh:cassadsa> select
iccid,imsi_circle_id,state,processtype,requesttype,last_updated_timestamp,creation_
timestamp from cassadsa.sim_map where last_updated_timestamp>='2017-12-26' and
processtype='PREPAID' and requesttype='SIMEX' allow filtering;
evolms@cqlsh:cassadsa> select
iccid,imsi_circle_id,state,processtype,requesttype,last_updated_timestamp,creation_
timestamp from cassadsa.sim_map where last_updated_timestamp>='2017-12-26' and
requesttype='PreToPost' allow filtering;
evolms@cqlsh> select
iccid,imsi_t,imsi_circle_id,state,processtype,requesttype,last_updated_timestamp,cr
eation_timestamp from cassadsa.sim_map where last_updated_timestamp>='2018-01-01'
and state='IMSI_ALLOCATED' allow filtering;
('89910271001002165581','89910271001002590184','89910271001002876211','899102710010
02573131','89910271001002202749','
89910271001003211301','89910271001002590242','89910271001003229949','89910271001003
230004','89910271001002172728','
','
'89910271001002819724','89910271001002327462','89910271001002820326','8991027100100
1814460','89910271001002581449','
89910271001001803612','89910271001001764921','89910271001002588873','89910271001002
202269','89910271001002570095','
89910271001002820060','89910271001001876295','89910271001002177214','89910271001002
328239','
89910271001002819757','89910271001002819799','89910271001002819955','89910271001002
561029','
89910271001002327611','89910271001002188625','89910271001002820359','89910271001002
202194','
89910271001002819922','89910271001002571291','89910271001002820052','89910271001002
820011','
89910271001002564809','89910271001002819948','89910271001002819971','89910271001002
820243','
89910271001003237686','89910271001002571283','89910271001002820144','89910271001002
571267','
89910271001002328163','89910271001002820177','89910271001002820201','89910271001002
820250','
89910271001002820078','89910271001001862238','89910271001002819997','89910271001002
202236','
89910271001003216359','89910271001002564015','89910271001002328221','89910271001002
328338','
89910271001001762727','89910271001002689952','89910271001002820268','89910271001002
328189','
89910271001002591513','89910271001002819765','89910271001003223405','89910271001002
327868','
89910271001002328262','89910271001002819963','89910271001002328353','89910271001002
328205','
89910271001001867906','89910271001002562597','89910271001002820029','89910271001002
173536','
89910271001003212564','89910271001003110552','89910271001003234048','89910271001002
662678','
89910271001001878259','89910271001002819807','89910271001002580748','89910271001001
762586','
89910271001002327645','89910271001002328379','89910271001002819989','89910271001001
762719','
89910271001003243098','89910271001002661712','89910271001002176794','89910271001001
880339','
89910271001002820136','89910271001002876278','89910271001002819773','89910271001002
819781','
89910271001001878895','89910271001002820045','89910271001002820037','89910271001002
819930','
89910271001002573099','89910271001002820128','89910271001002820367','89910271001001
861461','
89910271001003234030','89910271001001861941','89910271001002570905','89910271001001
871098','
89910271001002587560','89910271001002591539','89910271001002590754','89910271001002
820342','
89910271001002574311','89910271001002568198','89910271001002566556','89910271001002
565889','
89910271001002565772','89910271001002820334','89910271001001764749','89910271001002
586067','
89910271001002820003','89910271001002581720','89910271001002819740','89910271001002
820235'
'89910271001002831935','89910271001002110603','89910271001002819872','8991027100100
1880669','
89910271001002591547','89910271001002832222','89910271001002820193','89910271001002
820219','
89910271001002316960','89910271001002819716','89910271001002573735','89910271001001
862196','
89910271001001764897','89910271001002961773','89910271001002583643','89910271001002
202491','
89910271001002820110','89910271001002820318','89910271001002576795','89910271001001
861453','
89910271001002673741','89910271001001867047','89910271001002820227','89910271001001
876832','
89910271001001564909','89910271001001564917','89910271001001802523','89910271001001
802986','
89910271001001803570','89910271001001880685','89910271001002165581','89910271001002
202376','
89910271001002202699','89910271001002202715','89910271001002217309','89910271001002
570103','
89910271001002570806','89910271001002572034','89910271001002574287','89910271001002
575078','
89910271001002579765','89910271001002580722','89910271001002583650','89910271001002
584229','
89910271001002590184','89910271001002592552','89910271001002876211','89910271001002
967846','
89910271001003211301','89910271001003216714','89910271001003223306','89910271001003
229949','
89910271001003229964','89910271001003230004','89910271001001250608','89910271001002
214322','
89910271001002214298','89910271001002580755','89910271001002581423','89910271001002
588246','
89910271001001802879','89910271001002583452','89910271001002582272','89910271001002
579344','
89910271001002573685','89910271001002328080','89910271001002590747','89910271001002
573156','
89910271001002562860','89910271001003232166','89910271001001880214','89910271001002
662645','
89910271001002588857','89910271001003230053'