...
DBmetas are jsettings files under “Settings\Reader\DBMeta”
Columns filters
Limit indexing by table or column.
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBView, Geodi.Database", "WorkspaceName":"0000-Promotional and Educational Videos", "TableFilter":"*", "ColumnFilter":"*", "Columns":"-FILEPATH,-ID,DATE,GEODIFILELINK" }, ] } |
How rows appear in GEODI
In databases, each record appears on a record-by-record basis. The default title is the first text column value. You can change this for each table individually using DisplayNameMacro. You can also use other columns in the title macro. Macro rules are given at the end of the page.
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBRowDisplayName, Geodi.Database", "DisplayNameMacro":"[TEXT4]/[TEXT2]-[TEXT3]" } ] } |
Indexing files embedded in tables
Geodi can scan files with file paths in the database or are embedded as blobs. This document explains how to make the necessary settings.
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBSubContent, Geodi.Database", "TableFilter":"TEST", "IDColumnMacro":"[OBJECTID]", "FileNameColumnMacro":"[FILE1]", "FileMemoColumn":"file2" } ] } |
Indexing Multiple Embedded Files in a Table
You can use the following meta to index files embedded in multiple columns in the same table.
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBSubContent, Geodi.Database", "TableFilter":"TQA", "IDColumnMacro":"[OBJECTID]_1", "FileNameColumnMacro":"[file1]", "FileMemoColumn":"file2" }, { "__type":"Geodi.Database.Meta.DBSubContent, Geodi.Database", "TableFilter":"TQA", "IDColumnMacro":"[OBJECTID]_2", "FileNameColumnMacro":"[dosya1]", "FileMemoColumn":"dosya2" } ] } |
Indexing an Embedded File Without a Filename in a Table
When there is no file name in the table in the database, you can build one using the
FileNameColumnMacro
value. There are two examples below. The first example is a simple one. the second one assumes that some rows do not have an extension value.FileMemoColumn
is the file stream.Code Block language json { "Defines":[ { "__type":"Geodi.Database.Meta.DBSubContent, Geodi.Database", "TableFilter":"CMS.FileContentCore", "IDColumnMacro":"[FieldId][VersionNumber][MinorVersionNumber]", "FileNameColumnMacro":"[Internalid][Extension]", "FileMemoColumn":"FileContent" } ] }
In the following example, the
Extension
column is assumed to have the file extension. Some rows may have empty values. We assumed that the file is PDF if no extension. The macro might have returned an empty string to skip the files.Code Block language json { "Defines":[ { "__type":"Geodi.Database.Meta.DBSubContent, Geodi.Database", "TableFilter":"Documents", "IDColumnMacro":"[DocumentsID]", "FileNameColumnMacro":'=string.Concat(d["Internalid"],"-",d["CreateDate"],string.IsNullOrEmpty(d["Extension"])?".pdf":d["Extension"])', "FileMemoColumn":"File" } ] }
Indexing what is given with File Path in Table
You can also index files specified by file links in a record. (CSV files are not supported).
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBSubContent, Geodi.Database", "FileFullPathColumnMacro":"[PATH]", "FileFullPathColumnSplitter":"|" } ] } |
Specifying a Primary Key Column
A primary column is required for each table for scanning and versioning changes. GEODI sets the ObjectID value by default. You can specify a different column with the definition described here.
...
Code Block | ||
---|---|---|
| ||
{ "__type":"Geodi.Database.Meta.DBPKey, Geodi.Database", "TableFilter":"tablo1", "KeyColumns":"id" }, |
Indexing the result of a SQL statement
You create a new table named NewName with the SQL key. The SQL statement must be compatible with the relevant DBMS.
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBSQL, Geodi.Database", "TableFilter":"TEST,TEST1", "ColumnFilter":"TEST.TARIH,TEST.OBJECTID,TEST1.OBJECTID,TEST.TAMS1", "NewName":"DENEME12", "SQL":"SELECT TEST.* FROM TEST,TEST1 WHERE TEST.OBJECTID=TEST1.TAMS2", "KeyColumns":"OBJECTID" } ] } |
Row Based Authorization
You can authorize based on Table, SQL or View row.
You can use user and/or GEODI groups in "PermitMacro" & "DenyMacro" for authorization.
You can also use [geodi:username] for the users you create.
If you want to write more than one user, group, you should start with = and use advanced macro. Simple macro definition can only be used to define a single group/user.
Usernames or groups must be generated from a column in a table (or SQL, or View).
Rows will be authorized in the table, and these authorizations will be used in files (child content).
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBRowPermission,Geodi.Database", "TableFilter":"test", "ColumnFilter":"BIRIMLER,BIRIMLER_TEST", "PermitMacro":'=new string[] {d.Get("BIRIMLER"),d.Get("BIRIMLER_TEST")}', "DenyMacro":"" }, ] } ________________________________________________________________________________________ { "Defines":[ { "__type":"Geodi.Database.Meta.DBRowPermission,Geodi.Database", "TableFilter":"test", "ColumnFilter":"BIRIMLER,BIRIMLER_TEST", "PermitMacro":'=new string[] {d["BIRIMLER"],d["BIRIMLER_TEST"]}', "DenyMacro":"" } ] } |
Specifying the Text/Text Result of a Record
This feature is used to change the GEODI search index. When the nomenclature given in the context is searched through GEODI, it finds all the contents in the table. With Content, we can select the search word of the column of a record, we can turn words without a column name into a search word with this feature. You can write and name more than one [Column Name] in Content. It allows to turn off and on the setting made in the Ignore state in DBmeta.
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DBContent, Geodi.Database", "WorkspaceName":"otf_meta_testV1", "TableFilter":"TEST", "ColumnFilter":"TARIH", "Ignore":"False", "Content":"[TAMS2] ZAMAN [TEXT3]" } ] } |
...
Adjusting the Way Records Look
The html template you provide with the "TemplateName" key will determine the appearance of the records that meet the criteria. This template with ".html" extension should be under the Templates folder under the "DBMeta" file and the generated meta should be saved under the "DBMeta" folder.
...
Code Block | ||
---|---|---|
| ||
{ "Defines":[ { "__type":"Geodi.Database.Meta.DB_DLV_View, Geodi.Database", "TemplateName":"PortalAnkaraGeziveMesire.html" } ] } |
FieldIndex Settings (Limiting Searches by Column Name)
The default search covers all tables and all columns. To limit the search result based on columns, you should set FieldIndex. After setting "columnname:<your search phrase>", the criteria will be limited to the related column.
...
When this feature is active Words that are recognized in the database and fall in the KLV will be written next to the column in which they are found.
...
Sampling Data Discovery in Databases
By default, GEODI discovers all database contents. You can optionally sample and explore your database contents, so you can save on scanning time and storage space.
Project detail settings ContentReaderEnumerators → Veritabanınız → GenericSettings to add
"DB.SamplingMode":100
Tables/Selected Table/SQL query 100 records are randomly process.File-Based databases for use in Folder enumerator GenericSettings to add
"DB.SamplingMode":100
Such as *.xlsx , *.mdb, *.accdb from all types 100 records per table are random processed.
...
Make column names multilingual and define aliases
If you want, you should make the following definitions.
...
Code Block |
---|
<data name="att_{fieldname}" xml:space="preserve"> <value>{alias1}|{alias2}|{alias3}</value> </data> <data name="att_EnvanterNo" xml:space="preserve"> <value>Inventory Number|Inventory N|Inventory Position</value> </data> <data name="att_PersonName" xml:space="preserve"> <value>Name|Pname|Person Name</value> </data> |
...
Macros
You can write macros for values such as Document ID, File path. Macros allow you to solve situations where column values are directly insufficient. For which values macros can be used is specified in the related sections.
...
"DisplayNameMacro":'=d.Get<int>("DEGER")>-1?"Pozitif":"Negatif"'
Detail Information
Expand | ||
---|---|---|
| ||
|
...