Hi everybody. I tried to upload some data from Pos...
# gooddata-platform
a
Hi everybody. I tried to upload some data from Postgres to GoodData, but I am getting this error: SQLSTATE_NUMERIC_VALUE_OUT_OF_RANGE. Details: value "XXXXXXXXXX" is out of range for type integer: XXXXXXXXX'. And I saw that this value in the log is in the column NUMERO CARTAO. In Postgres, it is stored as a bigint value, since it is a 16 digit value. But in the logs, it appears as an [INT8] - NUMERO CARTAO[INT8] -> fact.abastecimentococasolar.numero_cartao{FACT}[INT] Has this happened to somebody else, and how did you do to solve this, please? Sorry for covering the numbers and putting many X's instead of the real numbers, but these are confidential information for a client of us.
m
that is because your value (if it has 16 digits) is out of range of integer (2,147,483,647). If you really want to work with this number as with fact - that is calculate sum, average etc. you will need to change the data type in the LDM to BigInteger which has higher range. But, if "numero cartao" actually means something like card number (i.e. payment card number), you probably do not want to have this value as a fact, but rather attribute. In GoodData with attributes you can filter, aggregate and break down metrics as well as count distinct number of values. While with facts you can sum them, calculate averages, divide etc. If it is really a card number, store it as an atttibute and keep the data type as string.
a
Hi Michael. Yes, this 16 digit number is a credit card number, and as you said, we don't plan to do any math operations with this number, but just group by. But for this database we have many Attributes, so we were planning to use this as a fact, since we have a limit for 20 Facts and Attributes in a table. I will check this with my client if it works. Thank you for your aswser.
p
🎉 New note created.