You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,7 +222,7 @@ This error is returned if a file is modified during the query execution. Usually
222
222
The serverless sql pools cannot read the files that are modified while the query is running. The query cannot take a lock on the files.
223
223
If you know that the modification operation is **append**, you can try to set the following option `{"READ_OPTIONS":["ALLOW_INCONSISTENT_READS"]}`. See how to [query append-only files](query-single-csv-file.md#querying-appendable-files) or [create tables on append-only files](create-use-external-tables.md#external-table-on-appendable-files).
224
224
225
-
### Query fails with conversion error
225
+
### Query fails with data conversion error
226
226
If your query fails with the error message
227
227
'bulk load data conversion error (type mismatches or invalid character for the specified codepage) for row n, column m [columnname] in the data file [filepath]', it means that your data types did not match the actual data for row number n and column m.
228
228
@@ -399,7 +399,7 @@ returns
399
399
| 5 | Eva |
400
400
401
401
402
-
### Query fails with error: Column [column-name] of type [type-name] is not compatible with external data type [external-data-type-name]
402
+
### Column [column-name] of type [type-name] is not compatible with external data type [external-data-type-name]
403
403
404
404
If your query fails with the error message 'Column [column-name] of type [type-name] is not compatible with external data type […]', it is likely that tried to map a PARQUET data type to the wrong SQL data type.
405
405
For instance, if your parquet file has a column price with float numbers (like 12.89) and you tried to map it to INT, this is the error message you will get.
@@ -580,12 +580,12 @@ A serverless SQL pool will return a compile-time warning if the `OPENROWSET` col
580
580
581
581
[Latin1_General_100_BIN2_UTF8 collation](best-practices-serverless-sql-pool.md#use-proper-collation-to-utilize-predicate-pushdown-for-character-columns) provides the best performance when you filter your data using string predicates.
582
582
583
-
### Some rows are not returned
583
+
### Some items from Cosmos DB are not returned
584
584
585
585
- There is a synchronization delay between transactional and analytical store. The document that you entered in the Cosmos DB transactional store might appear in analytical store after 2-3 minutes.
586
586
- The document might violate some [schema constraints](../../cosmos-db/analytical-store-introduction.md#schema-constraints).
587
587
588
-
### Query returns `NULL` values
588
+
### Query returns `NULL` values in some Cosmos DB items
589
589
590
590
Azure Synapse SQL will return `NULL` instead of the values that you see in the transaction store in the following cases:
591
591
- There is a synchronization delay between transactional and analytical store. The value that you entered in Cosmos DB transactional store might appear in analytical store after 2-3 minutes.
@@ -727,10 +727,12 @@ Login error: Login failed for user '<token-identified principal>'.
727
727
```
728
728
For service principals login should be created with Application ID as SID (not with Object ID). There is a known limitation for service principals which is preventing the Azure Synapse service from fetching Application ID from Microsoft Graph when creating role assignment for another SPI/app.
729
729
730
-
#### Solution #1
730
+
**Solution #1**
731
+
731
732
Navigate to Azure portal > Synapse Studio > Manage > Access control and manually add Synapse Administrator or Synapse SQL Administrator for desired Service Principal.
732
733
733
-
#### Solution #2
734
+
**Solution #2**
735
+
734
736
You need to manually create a proper login through SQL code:
735
737
```sql
736
738
use master
@@ -741,7 +743,8 @@ ALTER SERVER ROLE sysadmin ADD MEMBER [<service_principal_name>];
741
743
go
742
744
```
743
745
744
-
#### Solution #3
746
+
**Solution #3**
747
+
745
748
You can also setup service principal Synapse Admin using PowerShell. You need to have [Az.Synapse module](/powershell/module/az.synapse) installed.
746
749
The solution is to use cmdlet New-AzSynapseRoleAssignment with `-ObjectId "parameter"` - and in that parameter field to provide Application ID (instead of Object ID) using workspace admin Azure service principal credentials. PowerShell script:
Connect to serverless SQL endpoint and verify that the external login with SID `app_id_to_add_as_admin` is created:
761
765
```sql
762
766
select name, convert(uniqueidentifier, sid) as sid, create_date
@@ -779,6 +783,12 @@ There are some general system constraints that may affect your workload:
779
783
| Max size of the result set | up to 200 GB (shared between concurrent queries) |
780
784
| Max concurrency | Not limited and depends on the query complexity and amount of data scanned. One serverless SQL pool can concurrently handle 1000 active sessions that are executing lightweight queries, but the numbers will drop if the queries are more complex or scan a larger amount of data. |
781
785
786
+
### Cannot create a database in serverless SQL pool
787
+
788
+
The serverless SQL pools have limitations and you cannot create more than 20 databases per workspace. If you need to separate objects and isolate them, use schemas.
789
+
790
+
You don't need to use separate databases to isolate data for different tenants. All data is stored externally on a data lake and Cosmos DB. The metadata (table, views, function definitions) can be successfully isolated using schemas. Schema-based isolation is also used in Spark where databases and schemas are the same concepts.
791
+
782
792
## Next steps
783
793
784
794
Review the following articles to learn more about how to use serverless SQL pool:
0 commit comments