@@ -149,7 +149,8 @@ public bool TestAccount(string resourceGroupName, string accountName)
149
149
}
150
150
catch ( CloudException ex )
151
151
{
152
- if ( ex . Response != null && ex . Response . StatusCode == HttpStatusCode . NotFound )
152
+ if ( ( ex . Response != null && ex . Response . StatusCode == HttpStatusCode . NotFound ) || ex . Message . Contains ( string . Format ( Properties . Resources . FailedToDiscoverResourceGroup , accountName ,
153
+ _subscriptionId ) ) )
153
154
{
154
155
return false ;
155
156
}
@@ -362,33 +363,33 @@ private IPage<DataLakeAnalyticsAccount> ListAccountsWithNextLink(string nextLink
362
363
public USqlSecret CreateSecret ( string accountName , string databaseName ,
363
364
string secretName , string password , string hostUri )
364
365
{
365
- return _catalogClient . Catalog . CreateSecret ( databaseName , secretName ,
366
+ return _catalogClient . Catalog . CreateSecret ( accountName , databaseName , secretName ,
366
367
new DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters
367
368
{
368
369
Password = password ,
369
370
Uri = hostUri
370
- } , accountName ) ;
371
+ } ) ;
371
372
}
372
373
373
374
public USqlSecret UpdateSecret ( string accountName , string databaseName ,
374
375
string secretName , string password , string hostUri )
375
376
{
376
- return _catalogClient . Catalog . UpdateSecret ( databaseName , secretName ,
377
+ return _catalogClient . Catalog . UpdateSecret ( accountName , databaseName , secretName ,
377
378
new DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters
378
379
{
379
380
Password = password ,
380
381
Uri = hostUri
381
- } , accountName ) ;
382
+ } ) ;
382
383
}
383
384
384
385
public void DeleteSecret ( string accountName , string databaseName , string secretName )
385
386
{
386
- _catalogClient . Catalog . DeleteSecret ( databaseName , secretName , accountName ) ;
387
+ _catalogClient . Catalog . DeleteSecret ( accountName , databaseName , secretName ) ;
387
388
}
388
389
389
390
public USqlSecret GetSecret ( string accountName , string databaseName , string secretName )
390
391
{
391
- return _catalogClient . Catalog . GetSecret ( databaseName , secretName , accountName ) ;
392
+ return _catalogClient . Catalog . GetSecret ( accountName , databaseName , secretName ) ;
392
393
}
393
394
394
395
public bool TestCatalogItem ( string accountName , CatalogPathInstance path ,
@@ -576,7 +577,7 @@ public IList<CatalogItem> GetCatalogItem(string accountName, CatalogPathInstance
576
577
577
578
private USqlDatabase GetDatabase ( string accountName , string databaseName )
578
579
{
579
- return _catalogClient . Catalog . GetDatabase ( databaseName , accountName ) ;
580
+ return _catalogClient . Catalog . GetDatabase ( accountName , databaseName ) ;
580
581
}
581
582
582
583
private IList < USqlDatabase > GetDatabases ( string accountName )
@@ -597,13 +598,13 @@ private USqlAssembly GetAssembly(string accountName, string databaseName,
597
598
string assemblyName )
598
599
{
599
600
return
600
- _catalogClient . Catalog . GetAssembly ( databaseName , assemblyName , accountName ) ;
601
+ _catalogClient . Catalog . GetAssembly ( accountName , databaseName , assemblyName ) ;
601
602
}
602
603
603
604
private IList < USqlAssemblyClr > GetAssemblies ( string accountName , string databaseName )
604
605
{
605
606
List < USqlAssemblyClr > toReturn = new List < USqlAssemblyClr > ( ) ;
606
- var response = _catalogClient . Catalog . ListAssemblies ( databaseName , accountName ) ;
607
+ var response = _catalogClient . Catalog . ListAssemblies ( accountName , databaseName ) ;
607
608
toReturn . AddRange ( response ) ;
608
609
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
609
610
{
@@ -618,15 +619,15 @@ private USqlExternalDataSource GetExternalDataSource(string accountName,
618
619
string databaseName , string dataSourceName )
619
620
{
620
621
return
621
- _catalogClient . Catalog . GetExternalDataSource ( databaseName ,
622
- dataSourceName , accountName ) ;
622
+ _catalogClient . Catalog . GetExternalDataSource ( accountName , databaseName ,
623
+ dataSourceName ) ;
623
624
}
624
625
625
626
private IList < USqlExternalDataSource > GetExternalDataSources ( string accountName ,
626
627
string databaseName )
627
628
{
628
629
List < USqlExternalDataSource > toReturn = new List < USqlExternalDataSource > ( ) ;
629
- var response = _catalogClient . Catalog . ListExternalDataSources ( databaseName , accountName ) ;
630
+ var response = _catalogClient . Catalog . ListExternalDataSources ( accountName , databaseName ) ;
630
631
toReturn . AddRange ( response ) ;
631
632
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
632
633
{
@@ -641,15 +642,15 @@ private USqlCredential GetCredential(string accountName,
641
642
string databaseName , string credName )
642
643
{
643
644
return
644
- _catalogClient . Catalog . GetCredential ( databaseName ,
645
- credName , accountName ) ;
645
+ _catalogClient . Catalog . GetCredential ( accountName , databaseName ,
646
+ credName ) ;
646
647
}
647
648
648
649
private IList < USqlCredential > GetCredentials ( string accountName ,
649
650
string databaseName )
650
651
{
651
652
List < USqlCredential > toReturn = new List < USqlCredential > ( ) ;
652
- var response = _catalogClient . Catalog . ListCredentials ( databaseName , accountName ) ;
653
+ var response = _catalogClient . Catalog . ListCredentials ( accountName , databaseName ) ;
653
654
toReturn . AddRange ( response ) ;
654
655
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
655
656
{
@@ -663,13 +664,13 @@ private IList<USqlCredential> GetCredentials(string accountName,
663
664
private USqlSchema GetSchema ( string accountName , string databaseName ,
664
665
string schemaName )
665
666
{
666
- return _catalogClient . Catalog . GetSchema ( databaseName , schemaName , accountName ) ;
667
+ return _catalogClient . Catalog . GetSchema ( accountName , databaseName , schemaName ) ;
667
668
}
668
669
669
670
private IList < USqlSchema > GetSchemas ( string accountName , string databaseName )
670
671
{
671
672
List < USqlSchema > toReturn = new List < USqlSchema > ( ) ;
672
- var response = _catalogClient . Catalog . ListSchemas ( databaseName , accountName ) ;
673
+ var response = _catalogClient . Catalog . ListSchemas ( accountName , databaseName ) ;
673
674
toReturn . AddRange ( response ) ;
674
675
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
675
676
{
@@ -684,14 +685,14 @@ private USqlTable GetTable(string accountName, string databaseName, string schem
684
685
string tableName )
685
686
{
686
687
return
687
- _catalogClient . Catalog . GetTable ( databaseName , schemaName , tableName , accountName ) ;
688
+ _catalogClient . Catalog . GetTable ( accountName , databaseName , schemaName , tableName ) ;
688
689
}
689
690
690
691
private IList < USqlTable > GetTables ( string accountName , string databaseName ,
691
692
string schemaName )
692
693
{
693
694
List < USqlTable > toReturn = new List < USqlTable > ( ) ;
694
- var response = _catalogClient . Catalog . ListTables ( databaseName , schemaName , accountName ) ;
695
+ var response = _catalogClient . Catalog . ListTables ( accountName , databaseName , schemaName ) ;
695
696
toReturn . AddRange ( response ) ;
696
697
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
697
698
{
@@ -706,15 +707,15 @@ private USqlTableValuedFunction GetTableValuedFunction(string accountName,
706
707
string databaseName , string schemaName , string tableValuedFunctionName )
707
708
{
708
709
return
709
- _catalogClient . Catalog . GetTableValuedFunction ( databaseName , schemaName ,
710
- tableValuedFunctionName , accountName ) ;
710
+ _catalogClient . Catalog . GetTableValuedFunction ( accountName , databaseName , schemaName ,
711
+ tableValuedFunctionName ) ;
711
712
}
712
713
713
714
private IList < USqlTableValuedFunction > GetTableValuedFunctions ( string accountName ,
714
715
string databaseName , string schemaName )
715
716
{
716
717
List < USqlTableValuedFunction > toReturn = new List < USqlTableValuedFunction > ( ) ;
717
- var response = _catalogClient . Catalog . ListTableValuedFunctions ( databaseName , schemaName , accountName ) ;
718
+ var response = _catalogClient . Catalog . ListTableValuedFunctions ( accountName , databaseName , schemaName ) ;
718
719
toReturn . AddRange ( response ) ;
719
720
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
720
721
{
@@ -729,15 +730,15 @@ private USqlTableStatistics GetTableStatistic(string accountName, string databas
729
730
string schemaName , string tableName , string statisticsName )
730
731
{
731
732
return
732
- _catalogClient . Catalog . GetTableStatistic ( databaseName , schemaName ,
733
- tableName , statisticsName , accountName ) ;
733
+ _catalogClient . Catalog . GetTableStatistic ( accountName , databaseName , schemaName ,
734
+ tableName , statisticsName ) ;
734
735
}
735
736
736
737
private IList < USqlTableStatistics > GetTableStatistics ( string accountName ,
737
738
string databaseName , string schemaName , string tableName )
738
739
{
739
740
List < USqlTableStatistics > toReturn = new List < USqlTableStatistics > ( ) ;
740
- var response = _catalogClient . Catalog . ListTableStatistics ( databaseName , schemaName , tableName , accountName ) ;
741
+ var response = _catalogClient . Catalog . ListTableStatistics ( accountName , databaseName , schemaName , tableName ) ;
741
742
toReturn . AddRange ( response ) ;
742
743
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
743
744
{
@@ -752,14 +753,14 @@ private USqlView GetView(string accountName, string databaseName, string schemaN
752
753
string viewName )
753
754
{
754
755
return
755
- _catalogClient . Catalog . GetView ( databaseName , schemaName , viewName , accountName ) ;
756
+ _catalogClient . Catalog . GetView ( accountName , databaseName , schemaName , viewName ) ;
756
757
}
757
758
758
759
private IList < USqlView > GetViews ( string accountName , string databaseName ,
759
760
string schemaName )
760
761
{
761
762
List < USqlView > toReturn = new List < USqlView > ( ) ;
762
- var response = _catalogClient . Catalog . ListViews ( databaseName , schemaName , accountName ) ;
763
+ var response = _catalogClient . Catalog . ListViews ( accountName , databaseName , schemaName ) ;
763
764
toReturn . AddRange ( response ) ;
764
765
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
765
766
{
@@ -774,14 +775,14 @@ private USqlProcedure GetProcedure(string accountName, string databaseName, stri
774
775
string procName )
775
776
{
776
777
return
777
- _catalogClient . Catalog . GetProcedure ( databaseName , schemaName , procName , accountName ) ;
778
+ _catalogClient . Catalog . GetProcedure ( accountName , databaseName , schemaName , procName ) ;
778
779
}
779
780
780
781
private IList < USqlProcedure > GetProcedures ( string accountName , string databaseName ,
781
782
string schemaName )
782
783
{
783
784
List < USqlProcedure > toReturn = new List < USqlProcedure > ( ) ;
784
- var response = _catalogClient . Catalog . ListProcedures ( databaseName , schemaName , accountName ) ;
785
+ var response = _catalogClient . Catalog . ListProcedures ( accountName , databaseName , schemaName ) ;
785
786
toReturn . AddRange ( response ) ;
786
787
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
787
788
{
@@ -796,7 +797,7 @@ private IList<USqlType> GetTypes(string accountName, string databaseName,
796
797
string schemaName )
797
798
{
798
799
List < USqlType > toReturn = new List < USqlType > ( ) ;
799
- var response = _catalogClient . Catalog . ListTypes ( databaseName , schemaName , accountName ) ;
800
+ var response = _catalogClient . Catalog . ListTypes ( accountName , databaseName , schemaName ) ;
800
801
toReturn . AddRange ( response ) ;
801
802
while ( ! string . IsNullOrEmpty ( response . NextPageLink ) )
802
803
{
@@ -813,35 +814,35 @@ private IList<USqlType> GetTypes(string accountName, string databaseName,
813
814
814
815
public JobInformation GetJob ( string accountName , Guid jobId )
815
816
{
816
- return _jobClient . Job . Get ( jobId , accountName ) ;
817
+ return _jobClient . Job . Get ( accountName , jobId ) ;
817
818
}
818
819
819
820
public JobInformation SubmitJob ( string accountName , JobInformation jobToSubmit )
820
821
{
821
822
return
822
- _jobClient . Job . Create ( jobToSubmit . JobId . GetValueOrDefault ( ) ,
823
- jobToSubmit , accountName ) ;
823
+ _jobClient . Job . Create ( accountName , jobToSubmit . JobId . GetValueOrDefault ( ) ,
824
+ jobToSubmit ) ;
824
825
}
825
826
826
827
public JobInformation BuildJob ( string accountName , JobInformation jobToBuild )
827
828
{
828
829
return
829
- _jobClient . Job . Build ( jobToBuild , accountName ) ;
830
+ _jobClient . Job . Build ( accountName , jobToBuild ) ;
830
831
}
831
832
832
833
public void CancelJob ( string accountName , Guid jobId )
833
834
{
834
- _jobClient . Job . Cancel ( jobId , accountName ) ;
835
+ _jobClient . Job . Cancel ( accountName , jobId ) ;
835
836
}
836
837
837
838
public JobDataPath GetDebugDataPaths ( string accountName , Guid jobId )
838
839
{
839
- return _jobClient . Job . GetDebugDataPath ( jobId , accountName ) ;
840
+ return _jobClient . Job . GetDebugDataPath ( accountName , jobId ) ;
840
841
}
841
842
842
843
public JobStatistics GetJobStatistics ( string accountName , Guid jobId )
843
844
{
844
- return _jobClient . Job . GetStatistics ( jobId , accountName ) ;
845
+ return _jobClient . Job . GetStatistics ( accountName , jobId ) ;
845
846
}
846
847
847
848
public List < JobInformation > ListJobs ( string accountName , string filter , int ? top ,
0 commit comments