[ 
https://issues.apache.org/jira/browse/DRILL-7716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099467#comment-17099467
 ] 

ASF GitHub Bot commented on DRILL-7716:
---------------------------------------

cgivre commented on a change in pull request #2067:
URL: https://github.com/apache/drill/pull/2067#discussion_r419816763



##########
File path: contrib/format-spss/README.md
##########
@@ -0,0 +1,83 @@
+# Format Plugin for SPSS (SAV) Files
+This format plugin enables Apache Drill to read and query Statistical Package 
for the Social Sciences (SPSS) (or Statistical Product and Service Solutions) 
data files. According
+ to Wikipedia: (https://en.wikipedia.org/wiki/SPSS)
+ ***
+ SPSS is a widely used program for statistical analysis in social science. It 
is also used by market researchers, health researchers, survey companies, 
government, education researchers, marketing organizations, data miners, and 
others. The original SPSS manual (Nie, Bent & Hull, 1970) has been described as 
one of "sociology's most influential books" for allowing ordinary researchers 
to do their own statistical analysis. In addition to statistical analysis, data 
management (case selection, file reshaping, creating derived data) and data 
documentation (a metadata dictionary is stored in the datafile) are features of 
the base software.
+ ***
+ 
+## Configuration 
+To configure Drill to read SPSS files, simply add the following code to the 
formats section of your file-based storage plugin.  This should happen 
automatically for the default

Review comment:
       My thought is that it's better to add it in the bootstrap so that people 
know it's there.  Just my .02... 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Create Format Plugin for SPSS Files
> -----------------------------------
>
>                 Key: DRILL-7716
>                 URL: https://issues.apache.org/jira/browse/DRILL-7716
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - Text & CSV
>    Affects Versions: 1.17.0
>            Reporter: Charles Givre
>            Assignee: Charles Givre
>            Priority: Major
>              Labels: enhancement, ready-to-commit
>             Fix For: 1.18.0
>
>
> # Format Plugin for SPSS (SAV) Files
> This format plugin enables Apache Drill to read and query Statistical Package 
> for the Social Sciences (SPSS) (or Statistical Product and Service Solutions) 
> data files. According
>  to Wikipedia: [1]
>  
>  SPSS is a widely used program for statistical analysis in social science. It 
> is also used by market researchers, health researchers, survey companies, 
> government, education researchers, marketing organizations, data miners, and 
> others. The original SPSS manual (Nie, Bent & Hull, 1970) has been described 
> as one of "sociology's most influential books" for allowing ordinary 
> researchers to do their own statistical analysis. In addition to statistical 
> analysis, data management (case selection, file reshaping, creating derived 
> data) and data documentation (a metadata dictionary is stored in the 
> datafile) are features of the base software.
>  
>  
> ## Configuration 
> To configure Drill to read SPSS files, simply add the following code to the 
> formats section of your file-based storage plugin.  This should happen 
> automatically for the default
>  `cp`, `dfs`, and `S3` storage plugins.
>  
>  Other than the file extensions, there are no variables to configure.
>  
> ```json
> "spss": {
>           "type": "spss",
>           "extensions": [
>             "sav"
>           ]
>         }
> ```
> ## Data Model
> SPSS only supports two data types: Numeric and Strings.  Drill maps these to 
> `DOUBLE` and `VARCHAR` respectively. However, for some numeric columns, SPSS 
> maps these numbers to
>  text, similar to an `enum` field in Java.
>  
>  For instance, a field called `Survey` might have labels as shown below:
>  
>  <table>
>     <tr>
>         <th>Value</th>
>         <th>Text</th>
>     </tr>
>     <tr>
>         <td>1</td>
>         <td>Yes</td>
>     </tr>
>     <tr>
>         <td>2</td>
>         <td>No</td>
>     </tr>
>     <tr>
>         <td>99</td>
>         <td>No Answer</td>
>     </tr>
>  </table>
> For situations like this, Drill will create two columns. In the example above 
> you would get a column called `Survey` which has the numeric value (1,2 or 
> 99) as well as a column
>  called `Survey_value` which will map the integer to the appropriate value. 
> Thus, the results would look something like this:
>  
>  <table>
>  <tr>
>  <th>`Survey`</th>
>  <th>`Survey_value`</th>
>  </tr>
>  <tr>
>  <td>1</td>
>  <td>Yes</td>
>  </tr>
>   <tr>
>   <td>1</td>
>   <td>Yes</td>
>   </tr>
>    <tr>
>    <td>1</td>
>    <td>Yes</td>
>    </tr>
>     <tr>
>     <td>2</td>
>     <td>No</td>
>     </tr>
>      <tr>
>      <td>1</td>
>      <td>Yes</td>
>      </tr>
>       <tr>
>       <td>2</td>
>       <td>No</td>
>       </tr>
>   <tr>
>   <td>99</td>
>   <td>No Answer</td>
>   </tr>
>  </table>
> [1]: https://en.wikipedia.org/wiki/SPSS



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to