Skip to content

Commit cabbde6

Browse files
authored
Merge pull request #183708 from jovanpop-msft/patch-229
Update resources-self-help-sql-on-demand.md
2 parents e146134 + 4e6f996 commit cabbde6

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ This error is returned if a file is modified during the query execution. Usually
222222
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.
223223
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).
224224

225-
### Query fails with conversion error
225+
### Query fails with data conversion error
226226
If your query fails with the error message
227227
'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.
228228

@@ -399,7 +399,7 @@ returns
399399
| 5 | Eva |
400400

401401

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]
403403

404404
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.
405405
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
580580

581581
[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.
582582

583-
### Some rows are not returned
583+
### Some items from Cosmos DB are not returned
584584

585585
- 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.
586586
- The document might violate some [schema constraints](../../cosmos-db/analytical-store-introduction.md#schema-constraints).
587587

588-
### Query returns `NULL` values
588+
### Query returns `NULL` values in some Cosmos DB items
589589

590590
Azure Synapse SQL will return `NULL` instead of the values that you see in the transaction store in the following cases:
591591
- 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>'.
727727
```
728728
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.
729729

730-
#### Solution #1
730+
**Solution #1**
731+
731732
Navigate to Azure portal > Synapse Studio > Manage > Access control and manually add Synapse Administrator or Synapse SQL Administrator for desired Service Principal.
732733

733-
#### Solution #2
734+
**Solution #2**
735+
734736
You need to manually create a proper login through SQL code:
735737
```sql
736738
use master
@@ -741,7 +743,8 @@ ALTER SERVER ROLE sysadmin ADD MEMBER [<service_principal_name>];
741743
go
742744
```
743745

744-
#### Solution #3
746+
**Solution #3**
747+
745748
You can also setup service principal Synapse Admin using PowerShell. You need to have [Az.Synapse module](/powershell/module/az.synapse) installed.
746749
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:
747750
```azurepowershell
@@ -756,7 +759,8 @@ Connect-AzAccount -ServicePrincipal -Credential $cred -Tenant $tenantId
756759
New-AzSynapseRoleAssignment -WorkspaceName "<workspaceName>" -RoleDefinitionName "Synapse Administrator" -ObjectId "<app_id_to_add_as_admin>" [-Debug]
757760
```
758761

759-
#### Validation
762+
**Validation**
763+
760764
Connect to serverless SQL endpoint and verify that the external login with SID `app_id_to_add_as_admin` is created:
761765
```sql
762766
select name, convert(uniqueidentifier, sid) as sid, create_date
@@ -779,6 +783,12 @@ There are some general system constraints that may affect your workload:
779783
| Max size of the result set | up to 200 GB (shared between concurrent queries) |
780784
| 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. |
781785

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+
782792
## Next steps
783793

784794
Review the following articles to learn more about how to use serverless SQL pool:

0 commit comments

Comments
 (0)