My code (below) worked before, costing 10 credits and created a new feature layer.
# retrieves feature layer with a layer and table
itemid=xyzxyzxyzxyzxyz
item= gis.content.get(itemid)
layer = item.layers[0]
table =item.tables[0]
#dictionary to match by 'Location ID' attribute
attribute_relationship = [{"targetField": "Location_ID", "joinField": "Location_ID"}]
#Create new feature layer with joined layer and table
join_output = join_features(target_layer=layer,
join_layer=table,
attribute_relationship=attribute_relationship,
join_operation='JoinOneToMany',
output_name=strftime('Results%m_%d_%Y')
)
print("Join operation completed. Output item ID:", join_output.id)
However, it now runs with an error code when no changes has been made. How to I go about the error and what does it mean? The error message is below:
Failed to serve the request against portals/self/isServiceNameAvailable due to Error code: 400
Description: Bad syntax in request.
Message: Unsupported service type: {0}.
.
{"messageCode": "AO_100215", "message": "JoinFeatures failed."}
Failed to execute (JoinFeatures).
Failed.