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
\* This feature is not available in the Enterprise Premium edition. If you want to use this feature, please [contact us](https://www.scalar-labs.com/contact).
Copy file name to clipboardExpand all lines: docs/scalardb-analytics/design.mdx
+284-6Lines changed: 284 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,16 +86,294 @@ ScalarDB Analytics supports a wide range of data types across different data sou
86
86
-`DURATION`
87
87
-`INTERVAL`
88
88
89
-
These data types are used across all data sources and provide a unified type system for querying heterogeneous databases.
89
+
### Catalog information mappings by data source
90
90
91
-
### Data source integration
91
+
When registering a data source to ScalarDB Analytics, the catalog information of the data source, that is, namespaces, tables, and columns, are resolved and registered to the universal data catalog. To resolve the catalog information of the data source, a particular object on the data sources side are mapped to the universal data catalog object. This mapping is consists of two parts: catalog-level mappings and data-type mappings. In the following sections, we describe how ScalarDB Analytics maps the catalog level and data type from each data source into the universal data catalog.
92
92
93
-
When registering a data source to ScalarDB Analytics, two types of mappings occur:
93
+
#### Catalog-level mappings
94
94
95
-
1.**Catalog structure mapping**: The data source's catalog information (namespaces, tables, and columns) is resolved and mapped to the universal data catalog structure
96
-
2.**Data type mapping**: Native data types from each data source are mapped to the universal data types listed above
95
+
The catalog-level mappings are the mappings of the namespace names, table names, and column names from the data sources to the universal data catalog. To see the catalog-level mappings in each data source, select a data source.
97
96
98
-
These mappings ensure compatibility and consistency across different database systems. For detailed information about how specific databases are mapped, see [Catalog metadata reference](administration.mdx#catalog-metadata-reference) in the administration guide.
97
+
<TabsgroupId="data-source"queryString>
98
+
<TabItemvalue="scalardb"label="ScalarDB"default>
99
+
The catalog information of ScalarDB is automatically resolved by ScalarDB Analytics. The catalog-level objects are mapped as follows:
100
+
101
+
- The ScalarDB namespace is mapped to the namespace. Therefore, the namespace of the ScalarDB data source is always single level, consisting of only the namespace name.
The catalog information of PostgreSQL is automatically resolved by ScalarDB Analytics. The catalog-level objects are mapped as follows:
109
+
110
+
- The PostgreSQL schema is mapped to the namespace. Therefore, the namespace of the PostgreSQL data source is always single level, consisting of only the schema name.
111
+
- Only user-defined schemas are mapped to namespaces. The following system schemas are ignored:
112
+
- `information_schema`
113
+
- `pg_catalog`
114
+
- The PostgreSQL table is mapped to the table.
115
+
- The PostgreSQL column is mapped to the column.
116
+
117
+
</TabItem>
118
+
<TabItemvalue="mysql"label="MySQL">
119
+
The catalog information of MySQL is automatically resolved by ScalarDB Analytics. The catalog-level objects are mapped as follows:
120
+
121
+
- The MySQL database is mapped to the namespace. Therefore, the namespace of the MySQL data source is always single level, consisting of only the database name.
122
+
- Only user-defined databases are mapped to namespaces. The following system databases are ignored:
123
+
- `mysql`
124
+
- `sys`
125
+
- `information_schema`
126
+
- `performance_schema`
127
+
- The MySQL table is mapped to the table.
128
+
- The MySQL column is mapped to the column.
129
+
130
+
</TabItem>
131
+
<TabItemvalue="oracle"label="Oracle">
132
+
The catalog information of Oracle is automatically resolved by ScalarDB Analytics. The catalog-level objects are mapped as follows:
133
+
134
+
- The Oracle schema is mapped to the namespace. Therefore, the namespace of the Oracle data source is always single level, consisting of only schema name.
135
+
- Only user-defined schemas are mapped to namespaces. The following system schemas are ignored:
136
+
- `ANONYMOUS`
137
+
- `APPQOSSYS`
138
+
- `AUDSYS`
139
+
- `CTXSYS`
140
+
- `DBSNMP`
141
+
- `DGPDB_INT`
142
+
- `DBSFWUSER`
143
+
- `DVF`
144
+
- `DVSYS`
145
+
- `GGSYS`
146
+
- `GSMADMIN_INTERNAL`
147
+
- `GSMCATUSER`
148
+
- `GSMROOTUSER`
149
+
- `GSMUSER`
150
+
- `LBACSYS`
151
+
- `MDSYS`
152
+
- `OJVMSYS`
153
+
- `ORDDATA`
154
+
- `ORDPLUGINS`
155
+
- `ORDSYS`
156
+
- `OUTLN`
157
+
- `REMOTE_SCHEDULER_AGENT`
158
+
- `SI_INFORMTN_SCHEMA`
159
+
- `SYS`
160
+
- `SYS$UMF`
161
+
- `SYSBACKUP`
162
+
- `SYSDG`
163
+
- `SYSKM`
164
+
- `SYSRAC`
165
+
- `SYSTEM`
166
+
- `WMSYS`
167
+
- `XDB`
168
+
- `DIP`
169
+
- `MDDATA`
170
+
- `ORACLE_OCM`
171
+
- `XS$NULL`
172
+
173
+
</TabItem>
174
+
<TabItemvalue="sql-server"label="SQL Server">
175
+
The catalog information of SQL Server is automatically resolved by ScalarDB Analytics. The catalog-level objects are mapped as follows:
176
+
177
+
- The SQL Server database and schema are mapped to the namespace together. Therefore, the namespace of the SQL Server data source is always two-level, consisting of the database name and the schema name.
178
+
- Only user-defined databases are mapped to namespaces. The following system databases are ignored:
179
+
- `sys`
180
+
- `guest`
181
+
- `INFORMATION_SCHEMA`
182
+
- `db_accessadmin`
183
+
- `db_backupoperator`
184
+
- `db_datareader`
185
+
- `db_datawriter`
186
+
- `db_ddladmin`
187
+
- `db_denydatareader`
188
+
- `db_denydatawriter`
189
+
- `db_owner`
190
+
- `db_securityadmin`
191
+
- Only user-defined schemas are mapped to namespaces. The following system schemas are ignored:
192
+
- `master`
193
+
- `model`
194
+
- `msdb`
195
+
- `tempdb`
196
+
- The SQL Server table is mapped to the table.
197
+
- The SQL Server column is mapped to the column.
198
+
199
+
</TabItem>
200
+
<TabItemvalue="dynamodb"label="DynamoDB">
201
+
Since DynamoDB is schema-less, you need to specify the catalog information explicitly when registering a DynamoDB data source by using the following format JSON:
202
+
203
+
```json
204
+
{
205
+
"namespaces": [
206
+
{
207
+
"name": "<NAMESPACE_NAME>",
208
+
"tables": [
209
+
{
210
+
"name": "<TABLE_NAME>",
211
+
"columns": [
212
+
{
213
+
"name": "<COLUMN_NAME>",
214
+
"type": "<COLUMN_TYPE>"
215
+
},
216
+
...
217
+
]
218
+
},
219
+
...
220
+
]
221
+
},
222
+
...
223
+
]
224
+
}
225
+
```
226
+
227
+
In the specified JSON, you can use any arbitrary namespace names, but the table names must match the table names in DynamoDB and column name and type must match field names and types in DynamoDB.
228
+
229
+
</TabItem>
230
+
</Tabs>
231
+
232
+
#### Data-type mappings
233
+
234
+
The native data types of the underlying data sources are mapped to the data types in ScalarDB Analytics. To see the data-type mappings in each data source, select a data source.
235
+
236
+
<TabsgroupId="data-source"queryString>
237
+
<TabItemvalue="scalardb"label="ScalarDB"default>
238
+
|**ScalarDB Data Type**|**ScalarDB Analytics Data Type**|
It is important to ensure that the field values of `Number` types are parsable as a specified data type for ScalarDB Analytics. For example, if a column that corresponds to a `Number`-type field is specified as an `INT` type, its value must be an integer. If the value is not an integer, an error will occur when running a query.
0 commit comments