-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataViewExample.py
35 lines (28 loc) · 1.26 KB
/
dataViewExample.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import dataview_client as dvclient
'''
Properties are a dictionary where keys are property names and values can be either strings
or tuples in the form of ("type","value") where type is one of the Azure supported types:
Edm.Binary Array of bytes up to 64 KB in size.
Edm.Boolean Boolean value.
Edm.DateTime 64-bit value expressed as Coordinated Universal Time (UTC).
Edm.Double 64-bit floating point value.
Edm.Guid 128-bit globally unique identifier.
Edm.Int32 32-bit integer.
Edm.Int64 64-bit integer.
Edm.String UTF-16-encoded value. String values may be up to 64 KB in size.
Every entry must contain PartitionKey and RowKey. Both have to be strings.
props = {"Double":("Edm.Double","33.33"),"Address": "Cary","PartitionKey":"p","RowKey":"4"}
client = dvclient.DVClient("https://opus-dev.cnl.ncsu.edu:9001","dennis")
test_table = "TestTable2"
resp = client.create_table(test_table)
print "type of response:"
print type(resp)
print resp
print client.insert(test_table, props)
for k in client.get_all_from_table(test_table):
print k.Address
'''
client = dvclient.DVClient("https://opus-dev.cnl.ncsu.edu:9004","dennis")
#print client.list_tables()
print client.delete_table("TestTable1")
#print dir(client.get_all_from_table(test_table))