The input should be either a layer or table view; a feature class or table is not accepted. A layer contains the path to the dataset along with symbology information and feature or row selection information. Table views are the table equivalent of a layer.
If working in ArcMap, a feature class or table becomes a layer or table view when it is added to the ArcMap table of contents. A layer or table can also be created by using your feature class or table as input to the MakeFeatureLayer or MakeTableView tool. Learn more about using layers and table views.