Survey banner
Share your feedback on the Dataiku documentation with this 5 min survey. Thanks! TAKE THE SURVEY

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

Solved!
Angels
Level 1
How to get the size (MB) of a non-filesystem dataset?

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

 

  

0 Kudos
2 Solutions
JordanB
Dataiker

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

View solution in original post

0 Kudos
JordanB
Dataiker

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

View solution in original post

3 Replies
JordanB
Dataiker

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

0 Kudos
Angels
Level 1
Author

Hi @JordanB,

Yes, it works! Thank you very much.

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

Thanks!

0 Kudos
JordanB
Dataiker

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