Hi. I have an issue with loading my data and get t...
# gooddata-platform
j
Hi. I have an issue with loading my data and get the following error. Could you please explain a bit more about what is going wrong? "Reason: Upload to dataset dataset.vanswers failed with 'An error occured during loading of csv files: SQLSTATE_INVALID_TEXT_REPRESENTATION_PG. Details: invalid input syntax for type integer: ""
👀 1
j
Hello Josefin. I cannot go into detail without seeing your data, but in general, when you are loading values of type integer, the field is not allowed to be null. We had a case in the past where a customer did not include a column in their output stage for the sorting label. Since there was nothing there, the value was null, and it resulted in the same error message. integer: “” -> The two quotes with nothing between them represent a null value.
j
Hi Jan, thanks for the reply. That's rather strange though because it's been working alright w the null values up until recently. And even after adjusting that I've updated the database and replaced the null values, but still get the same error
j
I see. In that case, it might be that the error is tied to the integer column being used as a sorting label. Let me doublecheck this. In the meantime, have you done any changes to your datasets or labels since you started getting this error message?
j
Hi again. I managed to load the data to a new workspace and the only difference I can see is that, in the new workspace, the load configuration, the source type is "bigint" as in the database in rather than "int" (which it is in the workspace where the data won't load to) . The sourcetype for the field in the database changed when altering the values of in the column(still numerical values but added a calculation and replace the null values in some of the rows) and seems to automatically become a bigint. Is there any way to alter the source type in the gooddata platform so it reflects the datatype in the database and change it to a bigint?
I found the issue now, so never mind the above message. Thanks :)
j
Ho Josefin. I am glad you were able to find the issue. If you don’t mind sharing, what was it? I am sorry about the delay in my reply, by the way - there was an urgent incident I had to work on.
j
It was another column that had been changed to int in the data type in gooddata, but it was a varchar, and contained null values. Once that was corrected it all worked fine again and I was able to load the data. Suggestion: It would be good if the error message could include which of the fields it was reffering to. I'm still a bit curious about if its possible to change the source type in good data of an attribute or a fact? I removed the Response and added it again as a fact and then it became a number. The others added previously and are listed as bigints/ints /varchar rather than text and number. Not sure if that makes any difference for function, just interesting to know 🙂
j
Hi Josefin. Just to make sure I understand the question, are you asking if changing the datatype in your data source will be properly reflected in the platform? Or whether the Source Type can be changed manually from the platform?
j
Hi Jan. I'll try to elaborate the questions a bit more and hope it makes more sense. 🙂 • As I understand it, if the datatype in the datasource (in this case the database) is changed, I need to manually alter the data type for the field in gooddata, correct? • However, when the field already exists in the table, the Source type is not automatically updated to reflect the new data type in the load configuration in gooddata, correct? • Can the Source type in gooddata load configuration be changed manually on the platform?
d
Hi Josefin! Thanks for clarifying your questions :) I’ll try my best to answer in the same way. In summary, yes: Every time you update the LDM, you have to publish it to the workspace. If you are using GD.CN you can use the scan button, followed by “Scan Mode: update” and it will update the LDM. If you are using GD, then you can do it manually as explained here (depending on what you are trying to achieve) : https://help.gooddata.com/pages/viewpage.action?pageId=86795753
j
Hi Daniela, thanks for your reply. • To clarify, I'm using Gooddata platform (not CN). • According to the documentation "If you have a CSV file with data, you can use it to update the structure of an existing dataset by replacing it with the content of the CSV file." • This did not work since the structure is the same as previously, hence I get the response as screenshot. • How can I simply update the data source type of my field in the LDM without having to delete and add the attribute again? I do not want to delete and add it since dependencies will cause several insights to be deleted. • The message suggested I switch to the "table view" - how do I find that?
d
Hi Josefin, You can update the type by going to edit>choosing the field and it would look like this:
j
yes but that does not alter the source type in the load configuration, where it still says text, regardless of what i alter the data type to. So yes, in the fields it is listed as a integer, but in the source type of the load configuration it says text. All the widgets that has used this attribute stopped working now , even though it didnt alert about dependencies when publishing, and only say "contact adminsitrator".
d
I’m very sorry if I’m missing the point here! I see from the thread that you were having issues with an integer, my guess is that you are trying to change the integer to text on the LDM in GD? If so, this has to be done in the field, on the label for that field. No need to do it in the Load Configuration. May I know if this is what you are trying to achieve? or what change was done that the widgets are not working?
j
No worries, I find it difficult to really explain properly as well. If it doesnt matter what the load configuration says and the only way I have to change the data type is in the field, that's alright. Then it doesnt matter what the source type says. Correct? I solved it by changing the sorting of the attribute, and now it's working again. I have no idea how that fixed it, but I'm okay with that. 🙂
d
Correct 🙂 and thanks for being so patient with us and letting us know how this was fixed 🙌
👍 1