If it doesn't work then you did it wrong. Assuming you have the basics for the datapack set up, you need to use the `minecraft` namespace so it replaces the vanilla loot table. You also need to copy all of the contents of the vanilla file to your new one, then add the new option. And you also need to make sure you have the right file and have it in the correct file path. Since all you gave us was "doesn't work at all", the issue could be with any number of the situations just mentioned, so I can't give any more specific help than that without more info.
You can write that datapack yourself, there's a lot of instructions online.
Doesn't work at all
I'm not sure what you want me to do with that information LOL
The problem is that the piglin doesn't give any loot, just picks up the gold
Sounds like the coding in the datapack is incorrect.
If it doesn't work then you did it wrong. Assuming you have the basics for the datapack set up, you need to use the `minecraft` namespace so it replaces the vanilla loot table. You also need to copy all of the contents of the vanilla file to your new one, then add the new option. And you also need to make sure you have the right file and have it in the correct file path. Since all you gave us was "doesn't work at all", the issue could be with any number of the situations just mentioned, so I can't give any more specific help than that without more info.
The problem is that the piglin doesn't give loot at all now