Did you read this?
Edit:
Here’s the creation of the datatable using custom struct.
Although, I’m using a C++ struct here, this method will work for blueprint structs as well.
USTRUCT(Blueprintable)
struct FExampleDatatableRow : public FTableRowBase
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FString SomeVar;
};
http://i.imgur.com/rMNwYzK.png/
http://i.imgur.com/3Zj5MWH.png
And to get data from such data table in C++:
UDataTable* DataTable; // populate it however you want
const FName RowName = FName("SomeRow");
FExampleDatatableRow* FoundRow = DataTable->FindRow<FExampleDatatableRow>(RowName, "");