def createCustomerTable()

in bundle_adb_360/src/b_historical/1_createhistbronzeparquets.py [0:0]


def createCustomerTable(noofrows=2, minaddress=1, maxaddress=10) -> DataFrame:
    fs = Fieldset(locale=Locale.EN, i=noofrows)
    df = pd.DataFrame.from_dict({
            "customerId": fs("increment"),
            "firstName": fs("person.first_name"),
            "lastName" : fs("person.last_name"),
            "customerType" : fs("choice", items=['customer', 'server', 'onlineagent']),
            "birthDate" : fs("person.birthdate", min_year=1960, max_year=2020),
            "ssn" : fs("code.issn", mask="###-##-####"),
            "email": fs("email"),
            "phone": fs("telephone", mask="+1 (###) #5#-7#9#"),
            "fkaddress" : fs("numeric.integer_number", start=minaddress, end=maxaddress)
        })
    return spark.createDataFrame(df)