Giter Site home page Giter Site logo

Reference Previous Rows about dbldatagen HOT 3 OPEN

mwarqee avatar mwarqee commented on June 3, 2024
Reference Previous Rows

from dbldatagen.

Comments (3)

ronanstokes-db avatar ronanstokes-db commented on June 3, 2024

Thanks for filing this issue.

By design, the values for a given row do not depend on the previous row. This is to enable highly scalable parallelism.

However you could compute the combination of dates, hotels and room ids based on some other intermediate values to guarantee non overlap. Alternatively you could generate the data as you do in the example above and filter out conflicting data using where clauses on the data frame resulting from build.

To use the filtering approach, you would need to expand the records for date range, hotel and room id to produce one row for each day and then drop duplicates. You can then roll up the resulting data to produce the new date ranges.

I have some additional features in development regarding modelling more complex timing events - but it wont necessarily address this specific issue.

from dbldatagen.

mwarqee avatar mwarqee commented on June 3, 2024

Thanks for replying... The issue is nost simply limited to double entries as in the picture above but also to overlaps:
image

So in the image above, because of the prior row's date values, the following row's start_date should be ((1+max(End_date)) of all the end_date values in that column (which have the same hotel_id,room_number,room_type,room_status)- which in my view should happen at generation time.
I do not know how to implement that currently with the existing features in dbdatagen. I know my example is very specific, but I do see this as being applied across various use cases.
I'll keep experimenting, to see what is possible & looking forward to what will be implemented in the next releases with respect to conditional row generation values.

from dbldatagen.

ronanstokes-db avatar ronanstokes-db commented on June 3, 2024

Do you have some code that you can share so that i can repro what you are doing ?

from dbldatagen.

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.