Code Monkey home page Code Monkey logo

dgraphandweaviatetest's People

Contributors

wolfgangfahl avatar

Watchers

 avatar  avatar  avatar

dgraphandweaviatetest's Issues

adds support for schema information in plantuml notation

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

grafik

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

Allow for list of sampleRecords when deriving CREATE and INSERT Table commands

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.

work around https://bugs.python.org/issue41638

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'

Add copyTo function

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

adds support to retrieve Schema information from sqlite3

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

profile should show batch handling with correct range and total time

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.