How to get the size (MB) of a non-filesystem dataset?

Angels
Angels Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 3 Partner

Hello,

I would like to get the size in MB of a postgreSQL dataset, but I can't find the metric as it is in a filesystem managed dataset.

PostgreSQL metrics:

PostgreSQL_metrics.PNG

Filesystem managed metrics:

Filesystem_metrics.PNG

They are not in the Edit tab, where it is possible to add metrics and custom metrics.

PostgreSQL Edit Tab:

Captura.PNG

 Filesystem managed Edit Tab:

Captura_1.PNG

Is it possible? If not, why?

Thanks in advance.

Regards

  

Best Answers

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 297 Dataiker
    Answer ✓

    Hi @Angels
    ,

    As a workaround, you can use a SQL probe with a select statement to retrieve the size of the table.

    select pg_size_pretty(pg_relation_size('"table_name"'));

    Screen Shot 2022-10-25 at 11.38.02 AM.png

    Screen Shot 2022-10-25 at 11.35.09 AM.png

    Please let us know if you have any questions.

    Thanks,

    Jordan

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 297 Dataiker
    Answer ✓

    Hi @Angels
    ,

    Unfortunately, there is not. You would need to create the probe on each dataset.

    Please let us know if you have any other questions.

    Thanks!

    Jordan

Answers

  • Angels
    Angels Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 3 Partner

    Hi @JordanB
    ,

    Yes, it works! Thank you very much.

    Is it possible to create that metric for all the datasets in the flow?

    Thanks!

Setup Info
    Tags
      Help me…