wolfgangfahl / dgraphandweaviatetest Goto Github PK
View Code? Open in Web Editor NEWTest GraphQL based Dgraph and Weaviate systems
License: Apache License 2.0
Test GraphQL based Dgraph and Weaviate systems
License: Apache License 2.0
Newlines in string also need to be escaped
e.g. """this
is
a multiline
text
"""
allow adding ListOfDict records in given batch sizes
start with sqlite3 support.
for
CREATE TABLE Person(name TEXT PRIMARY KEY,born DATE,numberInLine INTEGER,wikidataurl TEXT,age FLOAT,ofAge BOOLEAN,lastmodified TIMESTAMP)
when called with parameter "packageName='Royals'"
the result should be:
http://diagrams.bitplan.com/render/png/0xff2b1e8c
with plantuml source code
package Royals {
entity Person {
name : TEXT <<PK>>
born : DATE
numberInLine : INTEGER
wikidataurl : TEXT
age : FLOAT
ofAge : BOOLEAN
lastmodified : TIMESTAMP
}
}
Try it at http://diagrams.bitplan.com by cut&paste and selecting render-mode plantuml
This simplifies "schemaless" approach because missing columns can be identified more quickly with a larger sample data set .eg. a few dozen, hundred or event thousand records. And if a column is not in the first thousand records it's relevance is probably not so high any way and only corner cases will need the column.
e.g. listOfDicts=[{'topic':'edit','description': 'Use the "edit" button'}]
When a column-value is missing in one of the records in list of records the error message of the python library is:
sqlite3.ProgrammingError: You did not supply a value for binding 2
This is not helpful - improve the error message as asked for in https://bugs.python.org/issue41638 - workaround the problem as long as it is not fixed upstream.
Step 2:
improve with a message like:
INSERT INTO Pokemon (name,type) values (:name,:type)
failed: no value supplied for column 'type'
Step 2:
improve with a message like:
INSERT INTO Pokemon (name,type) values (:name,:type)
failed: for record #2 name='Raichu': no value supplied for column 'type'
refactor existing code from ProceedingsTitleParser
def copyTo(self,copyDB,profile=True):
'''
copy my content to another database
Args:
copyDB(Connection): the target database
profile(boolean): if True show profile information
'''
startTime=time.time()
dump="\n".join(self.c.iterdump())
#cursor.executescript(dump)
if profile:
print("finished getting dump of %s in %5.1f s" % (self.dbname,time.time()-startTime))
dumpErrors=self.executeDump(copyDB.c,dump,self.dbname,profile=profile)
return dumpErrors
To compare performance
refactor result from WolfgangFahl/ProceedingsTitleParser#47 and add test case
see https://stackoverflow.com/a/63671566/1497139
for
CREATE TABLE Person(name TEXT PRIMARY KEY,born DATE,numberInLine INTEGER,wikidataurl TEXT,age FLOAT,ofAge BOOLEAN,lastmodified TIMESTAMP)
a list of dicts:
[ {'name': 'Person',
'columns': [
{'cid': 0, 'name': 'name', 'type': 'TEXT', 'notnull': 0, 'dflt_value': None, 'pk': 1},
{'cid': 1, 'name': 'born', 'type': 'DATE', 'notnull': 0, 'dflt_value': None, 'pk': 0},
{'cid': 2, 'name': 'numberInLine', 'type': 'INTEGER', 'notnull': 0, 'dflt_value': None, 'pk': 0},
{'cid': 3, 'name': 'wikidataurl', 'type': 'TEXT', 'notnull': 0, 'dflt_value': None, 'pk': 0},
{'cid': 4, 'name': 'age', 'type': 'FLOAT', 'notnull': 0, 'dflt_value': None, 'pk': 0},
{'cid': 5, 'name': 'ofAge', 'type': 'BOOLEAN', 'notnull': 0, 'dflt_value': None, 'pk': 0},
{'cid': 6, 'name': 'lastmodified', 'type': 'TIMESTAMP', 'notnull': 0, 'dflt_value': None, 'pk': 0}
]
}
]
should be returned
e.g.
batch for 1 - 250 of 1000 items in 3.6 s -> 3.6 s
batch for 251 - 500 of 1000 items in 3.5 s -> 7.8 s
batch for 501 - 750 of 1000 items in 3.6 s -> 12.0 s
batch for 751 - 1000 of 1000 items in 3.5 s -> 16.1 s
addData for 1000 items in 16.8 secs
addData for 1 - 247 of 247 items in 3.8 s -> 3.8 s
try Apache Jena as graph db alternative
Exception: unsupported type <class 'datetime.datetime'> for column start_date
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.