Arduino writes file to SD but not content to file
db.create(0, TABLE_SIZE, (unsigned int)sizeof(table_name));


The third parameter is the record size! sizeof doesn't work on data, it works on types, so your getting the size of a char* instead of the size of your sensorlogN struct.

Your code as written shouldn't compile! a char* doesn't have a .id member.

table_name.id = i;
table_name.input = 0;
table_name.timestamp = 0;