Как загрузить данные в формате JSON, доступные в TXT-файле, используя таблицу put в базе данных Oracle NoSql - PullRequest
0 голосов
/ 04 мая 2018

У меня есть два txt-файла, содержащие данные Json, доступные в системе Linux. Я создал соответствующие таблицы в Oracle NoSql для этих двух файлов. Теперь я хочу загрузить эти данные в созданную таблицу в базе данных Oracle NoSql.

Syntax:
put table -name <name> [if-absent | -if-present ]
[-json <string>] [-file <file>] [-exact] [-update] 

Explanation:
Put a row into the named table. The table name is a dot-separated name with the format table[.childTableName]*.

where:

-if-absent

Indicates to put a row only if the row does not exist.

-if-present

Indicates to put a row only if the row already exists.

-json

Indicates that the value is a JSON string.

-file

Can be used to load JSON strings from a file.

-exact

Indicates that the input JSON string or file must contain values for all columns in the table and cannot contain extraneous fields.

-update

Can be used to partially update the existing record.

Теперь я использую следующую команду для загрузки:

kv-> put table -name tablename -file /path-to-folder/file.txt
Error handling command put table -name tablename -file /path-to-folder/file.txt: Illegal value for numeric field predicted_probability: 0.0. Expected FLOAT, is DOUBLE
kv-> 

Я не могу найти причину. Ученые, пожалуйста, помогите.

Спасибо за помощь.

1 Ответ

0 голосов
/ 04 мая 2018

Да, я решил это. На самом деле возник конфликт между типом данных таблицы и типом данных json string. Позже я понял это.

Спасибо

...