We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code is present already to do this but does not work for following code snippet:
import dbldatagen as dg from pyspark.sql.types import StructType, StructField, StringType
shuffle_partitions_requested = 8 partitions_requested = 8 data_rows = 10000000
dataspec = (dg.DataGenerator(spark, rows=10000000, partitions=8) .withColumn("name", percent_nulls=1.0, template=r'\w \w|\w a. \w') .withColumn("payment_instrument_type", values=['paypal', 'visa', 'mastercard', 'amex'], random=True) .withColumn("payment_instrument", minValue=1000000, maxValue=10000000, template="dddd dddddd ddddd") .withColumn("email", template=r'\w.\w@\w.com') .withColumn("md5_payment_instrument", expr="md5(concat(payment_instrument_type, ':', payment_instrument))", base_columns=['payment_instrument_type', 'payment_instrument']) ) df1 = dataspec.build()
df1.display()
The text was updated successfully, but these errors were encountered:
ronanstokes-db
Successfully merging a pull request may close this issue.
Code is present already to do this but does not work for following code snippet:
import dbldatagen as dg
from pyspark.sql.types import StructType, StructField, StringType
shuffle_partitions_requested = 8
partitions_requested = 8
data_rows = 10000000
dataspec = (dg.DataGenerator(spark, rows=10000000, partitions=8)
.withColumn("name", percent_nulls=1.0, template=r'\w \w|\w a. \w')
.withColumn("payment_instrument_type", values=['paypal', 'visa', 'mastercard', 'amex'], random=True)
.withColumn("payment_instrument", minValue=1000000, maxValue=10000000, template="dddd dddddd ddddd")
.withColumn("email", template=r'\w.\w@\w.com')
.withColumn("md5_payment_instrument",
expr="md5(concat(payment_instrument_type, ':', payment_instrument))",
base_columns=['payment_instrument_type', 'payment_instrument'])
)
df1 = dataspec.build()
df1.display()
The text was updated successfully, but these errors were encountered: