Comments (3)
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.
Thanks for replying... The issue is nost simply limited to double entries as in the picture above but also to overlaps:
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.
Do you have some code that you can share so that i can repro what you are doing ?
from dbldatagen.
Related Issues (20)
- Setuptools need to include required packages for working with the library locally (outside of the databricks environment) HOT 2
- Improve build ordering dependencies
- Changed interim build labelling to comply with PEP 440 HOT 1
- DblDatagenerator causes global logger to issue messages twice in some circumstances HOT 9
- Allow precision and scale options to apply to any numeric type
- When generating array valued column generation spec, use different random seed for each element
- Support range of values for generating array valued columns
- ArrayType(StringType()) columns result in Null column, doesn't take values from `values` argument HOT 2
- Add support for constraints
- Add support for structured columns HOT 1
- How to set template and min,max value for a nested schema attribute HOT 1
- Document recommended Databricks runtime releases for Unity Catalog
- Using Databricks Labs Data Generator on Databricks Runtime 14.x
- DBLDatagen broken on 14.3LTS Shared Cluster HOT 2
- Upgrade this lib to be compatible with Spark Connect HOT 1
- Create some pre-canned standard datasets like the h20 groupby dataset HOT 2
- Random number generation not generating random data unless `maxValue` is specified or is implied from other options
- Compatibility Issue: dbldatagen DataAnalyzer Not Accepting Spark Connect DataFrame HOT 4
- DateRange Timestamp conversion on windows fails with timestamps close to EPOCH
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbldatagen.