私はSASを使ってJsonファイルを初めて解析しようとしています。 インターネット上にいくつかのスクリプトが見つかり、このコードをSAS上で試しましたが、JSONデータファイルで動作させることができませんでした。ここでSASでJsonファイルを解析する
data parsed;
infile data lrecl=32000 truncover scanover dlm=",";
input @'"driver_id":{' driver_id $255.
@'"publication_site_id":{' publication_site_id $255.
@'"confirmed_seat_count":{' confirmed_seat_count $255.
@'"published_date":{' published_date $255.
@'"trip_date":{' trip_date $255.
@'"first_publication_date":{' first_publication_date $255.
@'"profile_picture_added_date":{' profile_picture_added_date $255.;
driver_id=scan(driver_id, 1, '",');
published_date=scan(published_date, 1, '",');
trip_date =scan(trip_date, 1, '",');
publication_site_id=scan(publication_site_id, 1, '",');
confirmed_seat_count =scan(confirmed_seat_count, 1, '",');
first_publication_date =scan(first_publication_date, 1, '",');
profile_picture_added_date =scan(profile_picture_added_date, 1, '",');
run;
は私が助けのために非常に感謝しています私のJSONファイル
{
"driver_id": {"0":11450650,"1":4705453,"2":,"3":4892472,"4":47572650,"5":5242675},
"publication_site_id":{"0":1056,"1":1056,"2":1056,"3":5056,"4":1056,"5":1056},
"confirmed_seat_count":{"0":2.0,"1":0.0,"2":1.0,"3":0.0,"4":0.0,"5":0.0},
"published_date":{"0":"2015-06-16 00:00:00","1":"2015-06-16 00:00:00","2":"2015-06-16 00:00:00","3":"2015-06-16 00:00:00","4":"2015-06-16 00:00:00","5":"2015-06-16 00:00:00"},
"trip_date":{"0":"2015-06-21 19:00:00","1":"2015-06-21 12:00:00","2":"2015-06-19 17:00:00","3":"2015-06-17 15:30:23","4":"2015-06-21 15:00:00","5":"2015-06-21 17:00:00"},
"first_publication_date":{"0":"2015-01-10 00:00:00","1":"2014-01-25 00:00:00","2":"2014-12-22 00:00:00","3":"2014-10-22 00:00:00","4":"2015-06-16 00:00:00","5":"2014-11-20 00:00:00"},
"profile_picture_added_date":{"0":null,"1":null,"2":"2015-09-22 00:00:00","3":"2013-11-19 00:00:00","4":"2015-06-17 00:00:00","5":null}
}
の概要です。
よろしく SM
どのSASバージョンを使用していますか? – Altons