What you are showing there, are triples in the format that MarkLogic stores them in the database. Make sure to enable the triple index
from Admin ui for that database to be able to use SPARQL on them.
Once enabled you can run commands like count(cts:triples())
from QConsole to see how many triples have been loaded, and run SPARQL from there as well.
You can also connect to the /v1/graphs/sparql
REST endpoint.
Regarding how data should look as triples, given two sample records like below (expressed as XML for convenience):
<Drug_Dtl>
<Drug_ID>D001</Drug_ID>
<Drug_name>Glyburide 5 mg</Drug_name>
<Brand_name>Diabeta</Brand_name>
<Brand>Novo Nordisk</Brand>
<strength>5 mg</strength>
<NoOfPills>1</NoOfPills>
<TotalDailyDose>5 mg</TotalDailyDose>
<Cost>$51</Cost>
<DailyPills>1</DailyPills>
</Drug_Dtl>
<Prescriber>
<PrescriberId>PSC001</PrescriberId>
<PrescriberName>Wa‌​yne</PrescriberName>
<Prescriber_Address>7 Elgar Center</Prescriber_Address>
<City>Chicago</City>
<State>Illinois</State>
</Prescriber>
I would expect triples similar to (expressed as turtle for convenience):
<D001> <Drug_name> "Glyburide 5 mg".
<D001> <Brand_name> "Diabeta".
<D001> <Brand> "Novo Nordisk".
<D001> <strength> "5 mg".
<D001> <NoOfPills> "1".
<D001> <TotalDailyDose> "5 mg".
<D001> <Cost> "$51".
<D001> <DailyPills> "1".
<PSC001> <PrescriberName> "Wa‌​yne".
<PSC001> <Prescriber_Address> "7 Elgar Center".
<PSC001> <City> "Chicago".
<PSC001> <State> "Illinois".
HTH!