Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am adding a single entry to a table loaded from a mySQL source (red code). The whole load script is going bonkers. Sometimes the Calendar does not load, sometimes one of the other tables. When i remove the 'red code' it all works fine!
Thanks!
LOAD gm_id
,GM_Code&' '&Description AS Description
,Category
;
[tbl_gm_temp]:
SELECT ID AS gm_id
,`GM_Code`
,Description
,Category
FROM tpm.`dbo_gm`
;
NoConcatenate
tbl_gm:
LOAD * RESIDENT tbl_gm_temp;
Concatenate
LOAD '542' AS gm_id
,'01 Minor Stoppage' AS Description
,'unplanned' AS Category
;
DROP TABLE tbl_gm_temp;
Have you tried a Debug load with a limited set of records, for example 100 records? Does that succeed and does the data model look correct then?
Check this:
SELECT ID AS gm_id
,`GM_Code`
,Description
,Category
FROM tpm.`dbo_gm`
;
Value of `GM_Code`, it may cause the issue.
I continued working on this and found that:
1) The calendar issue i mentioned earlier was related to formatting of a date/time field, which is since sorted.
2) When I remove the LOAD RESIDENT section all works fine
3) What is happening is that the data of the next table in the LOAD script is being imported into the tbl_gm, even though i have NoConcat as follows:
LIB CONNECT TO 'bang-oee'
;
LOAD ID AS resource_id
,name AS [Resource name]
;
NoConcatenate
[tbl_resources]:
SELECT ID,
name
FROM oee.`tbl_resources`
;
Works fine like that. See other reply for more detail