Published on InterSystems Developer Community (https://community.intersystems.com)

Home > %DOC with DeepSee

Question
Tuan Minh Do · Jul 16, 2018

%DOC with DeepSee

Hello,

I have imported my data with the following code (%DocDB).

set filename = "/home/student/Dokumente/convertcsv.json"

IF $SYSTEM.DocDB.Exists("Fitabase1") { 

SET db = ##class(%DocDB.Database).%GetDatabase("Fitabase1")

}

ELSE {

SET db = ##class(%DocDB.Database).%CreateDatabase("Fitabase1") 

}

set arr = ##class(%DynamicAbstractObject).%FromJSON(filename)

SET jstring = arr.%ToJSON()

//SET doccount = db.%Size()

DO db.%FromJSON(jstring) 

Now I have data sets like 

#     ID     %Doc                                                                                                                                                                                                  %DocumentId     %LastModified
1     1     {"Id":1503960366,"ActivityDate":"3/25/2016","TotalSteps":11004,"TotalDistance":7.1100001335144,"Trac...     1     2018-07-16 16:00:50.836
2     2     {"Id":1503960366,"ActivityDate":"3/26/2016","TotalSteps":17609,"TotalDistance":11.5500001907349,"Tra...     2     2018-07-16 16:00:50.837
3     3     {"Id":1503960366,"ActivityDate":"3/27/2016","TotalSteps":12736,"TotalDistance":8.52999973297119,"Tra...     3     2018-07-16 16:00:50.837

1)How can I extract the data from %Doc, for example if I only want the ID or the ActivityDate.

2)Can I use this data in the Analyzer, DeepSee?

Thank you in advance for your help.

#Document Data Model (NoSQL) #InterSystems IRIS BI (DeepSee) #InterSystems IRIS

Source URL:https://community.intersystems.com/post/doc-deepsee