I'm trying to create a feature class from a table and I've gotten as far as you can see in my code below. I noticed that after running the code through the arcpy.MakeXYEventLayer_management
function, the code returned no errors but the January2018_points file never showed up in Output.gdb. Because of this, the next section of code where I use Feature Class to Feature Class does not work, and it returns an error saying the input parameter does not exist or is not supported.
Is there something I'm missing here?
# Import modules
import arcpy
from arcpy import env
# Set workspace
env.workspace = r"E:\GIS 4090\Projects\Project 1\Data"
env.overwriteOutput = True
# Import CSV file into a geodatabase using Copy Rows
arcpy.CopyRows_management("January2018.csv",\
r"E:\GIS 4090\Projects\Project 1\Data\Output.gdb\January2018")
print("Table imported to gdb.")
# Make XY Event later from the table
arcpy.MakeXYEventLayer_management(r"Output.gdb\January2018", "XCoord",
"YCoord",\
r"Output\January2018_points")
print("Temporary XY Event layer created.")
# Convert XY Event layer to a feature class using Feature Class to
Feature Class
out_path = r"E:\GIS 4090\Projects\Project 1\Data\Output.gdb"
arcpy.FeatureClassToFeatureClass_conversion(r"Output.gdb\January2018_points", out_path, r"Output.gdb\January2018_points")
print("XY Event Layer converted to feature class.")