↑ ↓ to move, Enter to open, Esc to close

    DBX-DEPData Engineer Professional

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search

    DBX-DEP · Practice

    Question 6 of 35

    Question DBX-DEP-040

    Single choiceChoose one answer.

    The data science team has created and logged a production model with MLflow. The following code correctly imports and applies the production model, producing predictions in a new DataFrame named preds with the schema "customer_id LONG, predictions DOUBLE, date DATE".

    The data science team wants the predictions stored in a Delta Lake table so that all predictions can be compared over time. Churn predictions will be generated no more than once each day.

    Which code block achieves this while minimizing potential compute costs?

    ExhibitCode
    Exhibit. Its content is given in the text version below.
    Text version
    from pyspark.sql.functions import current_date
    
    model = mlflow.pyfunc.spark_udf(spark, model_uri="models:/churn/prod")
    df = spark.table("customers")
    columns = ["account_age", "time_since_last_seen", "app_rating"]
    preds = (df.select(
      "customer_id",
      model(*columns).alias("predictions"),
      current_date().alias("date")
      )
    )
    
    A–E selectEnter check answerF flag←→ move