How to track percentage of increase and decrease in record count of table using metrics and checks.

Options
PK36313
PK36313 Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 10 Partner

Hello,

I have a requirement to track the percentage of increase or decrease of the table count each time when scenario get trigger and build got completed .

Can someone guide me how can I enable this using using metrics and checks.

Thanks in advance

Best Answer

  • Miguel Angel
    Miguel Angel Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 118 Dataiker
    Answer ✓
    Options

    Hi,

    You could add a an extra 'Execute Python code' step to your scenario to gather the desired metric data. This step would run after the dataset build and use the DSS Python API to query for the desired metrics.

    The method get_metric_history will allow you to get the full dataset metric information.

    For example, to get the historical of the row counts for a database table:

    import dataiku
    mydataset = dataiku.Dataset("orders_prepared_db")
    for i in mydataset.get_metric_history("record count")["values"]:
    print(i["value"])

Setup Info
    Tags
      Help me…