Yeah, the data table is not very well documented, I had to dig around a bit to figure it out.
Unless I’m mistaken, you’re trying to subclass UDataTable? If so, that’s not how it works. The fix in the thread you linked has already been applied, if you’re up to 4.7. What you’re experiencing is insufficient linkage on UDataTable functions because they are not exported outside of the engine.
Instead, you create a struct type which represents the data you want contained in your csv file and have it inherit FTableRowBase. Here’s an example of how we define in-game tips:
USTRUCT()
struct FInGameTip : public FTableRowBase
{
GENERATED_USTRUCT_BODY();
UPROPERTY( Category=InGameTip, EditAnywhere, BlueprintReadWrite )
FText TipTitle;
UPROPERTY( Category=InGameTip, EditAnywhere, BlueprintReadWrite )
FText TipBody;
UPROPERTY( Category=InGameTip, EditAnywhere, BlueprintReadWrite )
UTexture2D* TipIcon;
UPROPERTY( Category=InGameTip, EditAnywhere, BlueprintReadWrite )
FLinearColor TipTint;
};
And here’s a corresponding csv file:
Name,TipTitle,TipBody,TipIcon,TipTint
AttackTip,"ATTACKING",""It looks like you're trying to attack someone! Have you tried whacking them over the head?","Texture2D'/Game/UI/HUD/TipIcons/AttackIcon.AttackIcon'","(R=0.9,G=0.9,B=0.9,A=1.0)"
Once you have a csv file saved, it is simply imported into the editor like any other asset. It'll give you a preview of what the imported data will look like. Note the extra Name column -- this is implicit to all data table rows and that's how you identify and look up the row you want. For instance, looking up the above row would be done like this:
const FName TipKey = "AttackTip";
const FString ShowInGameTipContext = "ShowInGameTip";
FInGameTip* InGameTipHandle = InGameTipData->FindRow<FInGameTip>( TipKey, ShowInGameTipContext );
One of the tricky things about data tables can be figuring out the format for some types, for instance the FLinearColor above. It's basically using the engine's text serialization format, it's been a while since I figured out the format above but I recall I did it by copying something from the editor and pasting it in notepad. I believe it can be found in code by getting a property through reflection (UProperty*) then using ExportTextItem.
It's a bit of work, but once you get it working, data tables are probably the most flexible non-editor-based type of asset.