BookmarkSubscribeRSS Feed
Shakti_Sourav
Quartz | Level 8

issue1.PNG

I got this Error after Updating the data.. is it data level Error or Programming level Error ???

Because Before data Update, This logic was working Properly.

 

Suggest me what will I Do ?

Variables and Data Type in User WrittenVariables and Data Type in User WrittenVariables and Data Type in User WrittenVariables and Data Type in User Written

Thank You!!!

5 REPLIES 5
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @Shakti_Sourav 

It is difficult to say from the available information. The source to the user-written transformation is not shown, and the log is not included. Please do the following:

  1. Run the code again.
  2. Perform a metadata update on the input data set to the user-written transformation (right click on the work tables). One thing is the metadata registrations you see in the column list, another is the physical reality behind it, and the userwtitten transformation does not care about metadata.
  3. Post the step log instead of a screenshot of the error box.
Patrick
Opal | Level 21

You would need to share the SAS log with us. Just guessing based on what you show us:

You've changed somewhere in metadata a column from numerical to character and you've got some expression in the code which expects the variable to be character.

You are using a view as input. From the looks of it the column in the physical data the view uses is still numerical. Changing the data type in metadata doesn't change the data type in the physical data. This only happens when you run the code that re-creates the physical data using the changed metadata. 

 

Make sure the metadata data type which creates the physical data use by the view has the right data type and run your DI job from the node which then creates the physical data. ....and should this node not always recreate the physical data (i.e. because it's an append) then manually delete the physical SAS table and re-run the whole job.

 

And on a side note: If you've got a user written code node then change the default text "user written" to something more descriptive like "uw - <very short description what the logic does"

Shakti_Sourav
Quartz | Level 8

issue3.jpg

 

I got this error in User written log. 

Kurt_Bremser
Super User

This user written code has more than 2500 lines, what you show us is just the symptom, not the cause. What we see is that the dataset is not a dataset, but a SQL view. Look where the view is defined, and then see which of the source variables has the type character when numeric is expected.

Patrick
Opal | Level 21

For testing: Change in the node that creates view W3ZR3S9 the output to table and then execute this node. That will tell you directly where things don't match.

Fix the issue and only then change back to a view.

Also: At least for "important" tables it's worth to put in the little bit of extra effort and change the generated table name to something more "human readable". 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1940 views
  • 0 likes
  • 4 in conversation