GithubHelp home page GithubHelp logo

app-tree's Introduction

Compute tree levels

This application computes levels in a table representing a tree (e.g. product categories). The tree data must be stored in a child-parent relationship. A column named levels will be added to the table (root nodes will have number 1). Additionally a column named root will be added, containing the ID of the root item.

Configuration

Names of both input and output files are arbitrary. You can supply the following parameters to identify column names with ID and parent ID:

{
    "idColumn": "col1",
    "parentColumn": "col2"
}

If you do not supply the parameters, the table must contain columns categoryId and categoryParentId.

Sample input

categoryId categoryParentId title
1 0 foo
2 1 bar
3 1 baz
4 2 buzz

Sample output

categoryId categoryParentId title levels root
1 0 foo 1 1
2 1 bar 2 1
3 1 baz 2 1
4 2 buzz 3 1

License

MIT licensed, see LICENSE file.

app-tree's People

Contributors

odinuv avatar kacurez avatar ujovlado avatar

Watchers

Štěpán Vraný avatar Martin Zajíc avatar Roman Pištěk avatar  avatar Ondřej Hlaváček avatar Vojtěch Biberle avatar James Cloos avatar Martin Halamíček avatar Miroslav Čillík avatar Erik Zigo avatar Pavel Šuraba avatar  avatar Roman Braciník avatar Jakub Kotek avatar Jiří Semmler avatar Martin Vaško avatar Martin Jandl avatar  avatar  avatar

app-tree's Issues

Empty table on input causes error

Viz. job 331525087: Cannot upload file 'linked_orders.csv' to table 'out.c-app-snowflake.order_tree' in Storage API: Some columns are missing in the csv file. Missing columns: levels,root. Expected columns: parent,child,levels,root. Please check if the expected delimiter "," is used in the csv file.
ExceptionId docker-7c03753be01959c5b0d8aa4d67a5d8f6

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.