Code Monkey home page Code Monkey logo

Comments (3)

secretGeek avatar secretGeek commented on May 20, 2024

It's a good idea. It would also mean that when a tool is writing the files, you wouldn't have contention on those schema files.

from csvz.

secretGeek avatar secretGeek commented on May 20, 2024

How about the files would go into subfolder. e.g.

_meta/columns.csv

Can contain details of all columns in all tables.

or if using the "file per file" technique... and you have a file "states.csv"

_meta/columns/states.csv

  • would describe "states", with the same info that would normally be in the "columns.csv" file....
  • (and the filename column now becomes optional in that file, instead of required, as it is in "columns.csv")

And similarly:

_meta/tables/states.csv

Would describe the states.csv file, with the same info that would normally be in the "tables.csv" file

from csvz.

secretGeek avatar secretGeek commented on May 20, 2024

Interestingly: You can combine both methods!

For example consider a csvz containing a file states.csv

The table may be described in both "_meta/tables.csv" and _meta/tables/state.csv" -- in which case - the information about state.csv in the "tables.csv" would be ignored.

The columns of states.csv may be described in both "_meta/table-columns.csv" and _meta/tables/state.csv" -- in which case - the information about state.csv in the "tables.csv" would be ignored. The file under _meta/tables is considered "more specific" and of higher precedence.

(Suggestion for authors of Tooling that reads these files: they may want to output debug information that describes where meta data was sourced from, and highlights situations where precedence rules needed to be applied.)

Columns of states.csv may be described in both "_meta/columns.csv" and _meta/columns/state.csv" -- in which case - the information about state.csv in the "columns.csv" would be ignored. The file under _meta/conlumns is considered "more specific" and of higher precedence.

You can also mix and match without loss of meaning.

For example the table states.csv may be described in _meta/tables.csv while it's columns may be described in _meta/columns/states.csv

(Oh and I haven't described schema mappings yet... I'll get to that another time)

from csvz.

Related Issues (20)

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.