2016-05-09 1 views
0

Même dans proc sql, je n'utilise pas encore noexex, puis pourquoi obtenir une erreur. même requête sql en cours d'exécution sur la ruche et il donne un résultat correct aucune erreur de syntaxe.Déclaration non exécutée en raison de l'option NOEXEC

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. 
    58   disconnect from odbc; 
NOTE: Statement not executed due to NOEXEC option. 

"

proc sql ; 
    connect to odbc (dsn=inventory user=ashu password=''); 
    create table libname.test_table as select 
    c0 format=11., 
    c1 format=$30. length=30, 
    c2 format=11., 
    c3 format=11.2 
    from connection to odbc 
    (SELECT c0,c1,c2,c3 
    FROM test_table 
    limit 10;); 
    disconnect from odbc; 
    quit ; 

@superfluous log complet @ Joe même

1   ;*';*";*/;quit;run; 
    2   OPTIONS PAGENO=MIN; 
    3   %LET _CLIENTTASKLABEL='Program'; 
    4   %LET _CLIENTPROJECTPATH='C:\Users\goibibp-sas-admin\Desktop\In_Goibibo Reports\ingoibibo_inclusion.egp'; 
    5   %LET _CLIENTPROJECTNAME='ingoibibo_inclusion.egp'; 
    6   %LET _SASPROGRAMFILE=; 
    7   
    8   ODS _ALL_ CLOSE; 
    9   OPTIONS DEV=ACTIVEX; 
    10   GOPTIONS XPIXELS=0 YPIXELS=0; 
    11   FILENAME EGSR TEMP; 
    12   ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR 
    13    STYLE=HtmlBlue 
    14    STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css") 
    15    NOGTITLE 
    16    NOGFOOTNOTE 
    17    GPATH=&sasworklocation 
    18    ENCODING=UTF8 
    19    options(rolap="on") 
    20   ; 
    NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR 
    21   
    22   GOPTIONS ACCESSIBLE; 
    23   libname inibibo '/sasdata/sasdemo1/ingoibibo'; 
    NOTE: Libref INIBIBO was successfully assigned as follows: 
      Engine:  V9 
      Physical Name: /sasdata/sasdemo1/ingoibibo 
    24   
    25   
    26   proc sql; 

     27   connect to odbc (dsn=inventory user=goibibo password=XX); 
     ERROR: CLI error trying to establish connection: [unixODBC][DSI] The error message HardyHiveError could not be found in the en-US 
       locale. Check that /en-US/SimbaHiveODBCMessages.xml exists. 
     NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. 
     28   create table inibibo.ingoibibo_inclusion as select 
     29   id format=11., 
     30   inclusionname format=$50. length=50, 
     31   displayname format=$50. length=50, 
     32   rateplan_id format=11., 
     33   inclusion_status format=$20. length=20, 
     34   rateplan_status format=$20. length=20 
     35   from connection to odbc 
     36   (SELECT inc.id, inc.inclusionname, inc.displayname, ri.rateplan_id, 
     37   (CASE WHEN inc.isactive = true THEN 'Active Inclusion' WHEN inc.isactive = false THEN 'Non Active Inclusion' END) as 
     37  ! inclusion_status, 
     38   (CASE WHEN ri.inclusions_id = inc.id THEN 'With rate Plan' 
     39   WHEN ri.inclusions_id IS NULL THEN 'Without rate Plan' END) as rateplan_status 
     40   FROM goibibo_inventory.hotels_inclusions inc 
     41   LEFT JOIN goibibo_inventory.hotels_rateinclusions ri ON (ri.inclusions_id = inc.id);); 
     NOTE: Statement not executed due to NOEXEC option. 
     42   disconnect from odbc; 
     NOTE: Statement not executed due to NOEXEC option. 
     43   quit ; 
     NOTE: The SAS System stopped processing this step because of errors. 
     NOTE: PROCEDURE SQL used (Total process time): 
       real time   0.01 seconds 
       cpu time   0.02 seconds 


2               The SAS System         16:29 Monday, May 9, 2016 

44   /* creating index on exiting table 
45   for more detail http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a001395386.htm*/ 
46   /*proc sql; 
47   create index createdon on inibibo.ingoibibo_hotel_booking(createdon); 
48   quit; 
49   */ 
50   

    51   /* remove table from LasR server if exist */ 
    52   %macro lasrDeletedIfExists(lib,name); 
    53   %if %sysfunc(exist(&lib..&name.)) %then %do; 
    54   proc datasets library=&lib. nolist; 
    55   delete &name.; 
    56   quit; 
    57   %end; 
    58   %mend; 
    59   
    60   /* Load data in LasR */ 
    61   /* inTable : reference of datasource table (lib.table) */ 
    62   /* lasRTable : reference of target table in lasR server (lib.table) */ 
    63   /* lasrLabel : label to use for the lasr Table (users description) */ 
    64   %macro loadDataInLasR(inTable,lasRTable,lasrLabel); 
    65   proc options option=MEMSIZE;run; 
    66   data VALIBLA.&lasRTable (label=&lasrLabel);set inibibo.&inTable;run; 
    67   %mend; 
    68   
    69   /* Refresh metadata for the selected lasR table */ 
    70   %macro updateMetadataForLasrTable(lasrLibref,mdsTargetFolder,lasrTableName); 
    71   proc metalib; 
    72    omr (LIBURI="[email protected]='&lasrLibref'"); 
    73    /*no more used : update_rule=(delete);*/ 
    74    report(type=summary); 
    75    folder="&mdsTargetFolder"; 
    76    select=("&lasrTableName"); 
    77   run; 
    78   %put PROC METALIB returned &SYSRC.; 
    79   %mend; 
    80   
    81  


82   
83   /* Access the LASR library */ 
84   LIBNAME VALIBLA SASIOLA TAG=HPS PORT=11001 HOST="nmclbi01.nm.ibibo.com" 
84  ! SIGNER="http://nmclbi01.nm.ibibo.com:7080/SASLASRAuthorization" ; 
NOTE: Libref VALIBLA was successfully assigned as follows: 
     Engine:  SASIOLA 
     Physical Name: SAS LASR Analytic Server engine on local host, port 10011 
85   
86   /* remove table from memory if loaded in lasr server 
87   * Param1 : LASR libref 
88   * Param2 : LASR table name 
89   */ 
90   
91   %lasrDeletedIfExists(VALIBLA, ingoibibo_inclusion); 



NOTE: Deleting VALIBLA.INGOIBIBO_INCLUSION (memtype=DATA). 
NOTE: The table HPS.INGOIBIBO_INCLUSION has been removed from the SAS LASR Analytic Server. 
NOTE: PROCEDURE DATASETS used (Total process time): 
3               The SAS System         16:29 Monday, May 9, 2016 

     real time   0.70 seconds 
     cpu time   0.03 seconds 


92   
93   
94   /* Load data in LasR 
95   * Param1 : local table to read 
96   * Param2 : LASR table to push (write) in LASR server 
97   * Param3 : Label to use for user description on the table 
98   */ 
99   %let etls_endtime = %sysfunc(datetime(), datetime20.); 
100   
101  %loadDataInLasR(ingoibibo_inclusion,ingoibibo_inclusion,Loaded on &etls_endtime.); 

    SAS (r) Proprietary Software Release 9.4 TS1M3 

MEMSIZE=96745808640 
        Specifies the limit on the amount of virtual memory that can be used during a SAS session. 
NOTE: PROCEDURE OPTIONS used (Total process time): 
     real time   0.00 seconds 
     cpu time   0.00 seconds 



NOTE: There were 45690 observations read from the data set INIBIBO.INGOIBIBO_INCLUSION. 
NOTE: The data set VALIBLA.INGOIBIBO_INCLUSION has 45690 observations and 6 variables. 
NOTE: DATA statement used (Total process time): 
     real time   1.58 seconds 
     cpu time   0.05 seconds 


102   
103   
104  /* Update metadata for the selected lasr table 
105  * Param1 : LASR library libref 
106  * Param2 : Target metadata server folder 
107  * Param3 : LASR table name (only the table name, no libref) 
108  */ 

    109  %updateMetadataForLasrTable(VALIBLA,/Shared Data/SAS Visual Analytics/Public/LASR,ingoibibo_inclusion); 

NOTE: A total of 1 tables were analyzed for library "Visual Analytics LASR". 
NOTE: Metadata for 1 tables was updated. 
NOTE: Metadata for 0 tables was added. 
NOTE: Metadata for 0 tables matched the data sources. 
NOTE: 0 tables listed in the SELECT or EXCLUDE statement were not found in either the metadata or the data source. 
NOTE: 0 other tables were not processed due to error or UPDATE_RULE. 
NOTE: PROCEDURE METALIB used (Total process time): 
     real time   1.96 seconds 
     cpu time   0.11 seconds 


    PROC METALIB returned 0 
    110   
    111   
    112  GOPTIONS NOACCESSIBLE; 
    113  %LET _CLIENTTASKLABEL=; 
    114  %LET _CLIENTPROJECTPATH=; 

4               The SAS System         16:29 Monday, May 9, 2016 

115  %LET _CLIENTPROJECTNAME=; 
116  %LET _SASPROGRAMFILE=; 
117   
118  ;*';*";*/;quit;run; 
119  ODS _ALL_ CLOSE; 
120   
121   
122  QUIT; RUN; 

Maintenant, je fais face même question dans tous les rapports. Avant aujourd'hui tous les rapports sont en cours d'exécution sans erreur, mais soudainement erreur reflétant dans tous les rapports

+0

a posé une question similaire dans le passé: https://communities.sas.com/t5/SAS-Procedures/Connect-to-Oracle-from-SAS/td-p/89876 et il a été recommandé que vous essayez de mettre des citations autour de votre nom d'utilisateur et mot de passe. Est ce que ça aide? – superfluous

+0

@superfluous Cela aurait du sens si l'erreur se situait après l'instruction 'connect to', mais étant donné qu'il s'agit de la requête SQL réelle, cela ne ressemble pas au problème (bien qu'il vaille la peine d'être lu dans le journal). – Joe

Répondre

0

Solution pour le même nom de nom de base de données dans la requête proc sql comme nombase.nom_table, il fonctionnera sans erreur.

proc sql ; 
connect to odbc (dsn=inventory user=ashu password=''); 
create table libname.test_table as select 
c0 format=11., 
c1 format=$30. length=30, 
c2 format=11., 
c3 format=11.2 
from connection to odbc 
(SELECT c0,c1,c2,c3 
FROM db_name.test_table 
limit 10;); 
disconnect from odbc; 
quit ; 
+0

Alors qu'est-ce qui a changé pour le casser? Avez-vous défini ce paramètre par défaut dans votre connexion ODBC, puis supprimez-le par défaut? –

1

NOEXEC est défini sur PROC SQL voit une erreur dans une étape précédente. Il n'exécutera alors plus de lignes de code, mais il vérifiera leur syntaxe.

Dans ce cas, vous devrez rechercher plus loin dans le journal pour voir ce qui s'est passé: la tentative de connexion a échoué ou la requête de sélection a échoué.

+0

même proc sql requête donne résultat correct sur Hive cette erreur viennent uniquement dans les nouveaux programmes de la même manière que je crée mes programmes précédents. –

+0

Quelque chose est arrivé avant cette note pour définir une erreur. Je ne peux pas vous dire quoi, malheureusement. Basé sur l'emplacement, ce n'était pas avec la chaîne de connexion elle-même, mais avec la requête. Regardez la ligne immédiatement avant ce que vous avez posté - ce devrait être un message d'erreur. – Joe