I found this article helpful:
https://www.jetbrains.com/help/datagrip/import-data.html#import-data-to-a-database
Right-click on the schema name in Database Explorer and select SQL Scripts > Run SQL Script. Then select the file you want to import.
This worked well for me in DataGrip 2023.1.2.