This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
admin:basics:rawdata:create [2011/03/08 00:31] els |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~NOTOC~~ | ||
| - | {{page>:top_add&nofooter&noeditbtn}} | ||
| - | |||
| - | ====== Administration: Omnidex Fundamentals ====== | ||
| - | |||
| - | ===== Raw Data Files ===== | ||
| - | |||
| - | [[admin:basics:rawdata:home|Overview]] | | ||
| - | [[admin:basics:rawdata:environments|Environments]] | | ||
| - | **[[admin:basics:rawdata:create|Creation]]** | | ||
| - | [[admin:basics:rawdata:queries|Queries]] | | ||
| - | [[admin:basics:rawdata:updates|Updates]] | | ||
| - | [[admin:basics:rawdata:types|File Types]] | ||
| - | |||
| - | ---- | ||
| - | ==== Creating Raw Data Files ==== | ||
| - | |||
| - | There are many ways to create raw data files. Omnidex is especially versatile at access data files from many different sources. Here are some of the approaches that can be used to generate raw data files: | ||
| - | |||
| - | * **Omnidex SQL** - Omnidex SQL statements can be used to generate raw data files. The [[dev:sql:statements:export|EXPORT]] statement can be used to convert the results of any SQL statement into any of the types raw data files supported by Omnidex. These EXPORT statements can be as simple as exporting all of the columns from a table, or as complex as joining multiple tables with complex aggregations and expressions. Here are two examples: | ||
| - | |||
| - | === Example 1: Export of a table === | ||
| - | |||
| - | This example exports all of the columns and rows from a table. | ||
| - | |||
| - | <code> | ||
| - | export (select * | ||
| - | from INDIVIDUALS) | ||
| - | to individuals.dat | ||
| - | with DELETE; | ||
| - | </code> | ||
| - | |||
| - | === Example 2: Denormalization of two tables === | ||
| - | |||
| - | This example joins two tables and exports specific columns, applying criteria to restrict the rows returned. It also uses SQL functions to create new columns. | ||
| - | |||
| - | <code> | ||
| - | export (select I.NAME, | ||
| - | H.ADDRESS, | ||
| - | H.CITY, | ||
| - | H.STATE, | ||
| - | H.ZIP, | ||
| - | I.PHONE, | ||
| - | I.EMAIL, | ||
| - | $compare_dates(I.BIRTHDAY, current_date, 'YEARS') AGE | ||
| - | from INDIVIDUALS I | ||
| - | join HOUSEHOLDS H on I.HOUSEHOLD = H.HOUSEHOLD | ||
| - | where H.STATE = 'CA') | ||
| - | to CA_individuals.dat | ||
| - | with DELETE; | ||
| - | </code> | ||
| - | |||
| - | === Example 3: Summarization of two tables === | ||
| - | |||
| - | This example joins two tables and exports aggregations to form a summary table. | ||
| - | |||
| - | <code> | ||
| - | export (select H.STATE, | ||
| - | H.ZIP, | ||
| - | count(distinct H.HOUSEHOLD), | ||
| - | count(*) | ||
| - | from INDIVIDUALS I | ||
| - | join HOUSEHOLDS H on I.HOUSEHOLD = H.HOUSEHOLD | ||
| - | group by H.STATE, | ||
| - | H.ZIP) | ||
| - | to individuals_summary.dat | ||
| - | with DELETE; | ||
| - | </code> | ||
| - | |||
| - | Omnidex provides SQL statements that can be used to create raw data files. Relational databases and office products often have export utilities that create raw data files. Many third party ETL tools can also be used to create raw data files. Vendors often ship data in the form of raw data files. | ||
| - | |||
| - | ===== ===== | ||
| - | |||
| - | **[[admin:basics:rawdata:environments|Prev]]** | | ||
| - | **[[admin:basics:rawdata:queries|Next]]** | ||
| - | |||
| - | ====== Additional Resources ====== | ||
| - | |||
| - | See also: | ||
| - | |||
| - | {{page>:admin:basics:see_also&nofooter&noeditbtn}} | ||
| - | |||
| - | {{page>:bottom_add&nofooter&noeditbtn}} | ||