Learning Tabulify - Step 5 - How to print Data Resources

Learning Tabulify - Step 5 - How to print Data Resources

About

In the previous page, we learned how to select data resource. This page will show you how to discover the content of data resource.

Tabulify offers three command to explore the data content:

  • print: to print the whole content
  • head: to print the first records of content
  • tail: to print the last records of content

Print

The data print command print the whole content.

Example:

tabli data print [email protected]
r_reason_sk   r_reason_id        r_reason_desc
-----------   ----------------   -------------------
          1   AAAAAAAABAAAAAAA   Package was damaged
tabli data print [email protected]howto
Last Name           First Name   Birth Date   Wikipedia Page
-----------------   ----------   ----------   ---------------------------------------------------
Schwarzenegger      Arnold       1947-07-30   https://en.wikipedia.org/wiki/Arnold_Schwarzenegger
Norman              Don          1935-12-25   https://en.wikipedia.org/wiki/Don_Norman
Harbison Carnagey   Dale         1888-11-24   https://en.wikipedia.org/wiki/Dale_Carnegie
Kahneman            Daniel       1934-03-05   https://en.wikipedia.org/wiki/Daniel_Kahneman

Head / Tail

The print command is useful for data resource with a small size but is not practicable with big data resource because the output will overflow the console.

That's when you can use one of this command:

  • the data head command print the first pieces of content of a data resource
  • the data tail command print the last pieces of content of a data resource

Example with the tpcs connection and the fact table customer

  • head
tabli data head --limit 10 [email protected]
The first 10 rows of the data resource ([email protected]):
c_customer_sk   c_customer_id      c_current_cdemo_sk   c_current_hdemo_sk   c_current_addr_sk   c_first_shipto_date_sk   c_first_sales_date_sk   c_salutation   c_first_name   c_last_name   c_preferred_cust_flag   c_birth_day   c_birth_month   c_birth_year   c_birth_country      c_login   c_email_address                     c_last_review_date_sk
-------------   ----------------   ------------------   ------------------   -----------------   ----------------------   ---------------------   ------------   ------------   -----------   ---------------------   -----------   -------------   ------------   ------------------   -------   ---------------------------------   ---------------------
            1   AAAAAAAABAAAAAAA               980124                 7135                 946                  2452238                 2452208   Mr.            Javier         Lewis         Y                                 9              12           1936   CHILE                          [email protected]                      2452508
            2   AAAAAAAACAAAAAAA               819667                 1461                 655                  2452318                 2452288   Dr.            Amy            Moses         Y                                 9               4           1966   TOGO                           [email protected]                            2452318
            3   AAAAAAAADAAAAAAA              1473522                 6247                 572                  2449130                 2449100   Miss           Latisha        Hamilton      N                                18               9           1979   NIUE                           [email protected]                            2452313
            4   AAAAAAAAEAAAAAAA              1703214                 3986                 558                  2450030                 2450000   Dr.            Michael        White         N                                 7               6           1983   MEXICO                         [email protected]                               2452361
            5   AAAAAAAAFAAAAAAA               953372                 4470                 368                  2449438                 2449408   Sir            Robert         Moran         N                                 8               5           1956   FIJI                           [email protected]                               2452469
            6   AAAAAAAAGAAAAAAA               213219                 6374                  82                  2451883                 2451853   Ms.            Brunilda       Sharp         N                                 4              12           1925   SURINAME                       [email protected]                    2452430
            7   AAAAAAAAHAAAAAAA                68377                 3219                 814                  2451438                 2451408   Ms.            Fonda          Wiles         Y                                24               4           1985   GAMBIA                         [email protected]                       2452360
            8   AAAAAAAAIAAAAAAA              1215897                 2471                 598                  2449406                 2449376   Sir            Ollie          Shipman       N                                26              12           1938   KOREA, REPUBLIC OF             [email protected]                              2452334
            9   AAAAAAAAJAAAAAAA              1168667                 1404                 388                  2452275                 2452245   Sir            Karl           Gilbert       N                                26              10           1966   MONTSERRAT                     [email protected]                 2452454
           10   AAAAAAAAKAAAAAAA              1207553                 5143                 580                  2451353                 2451323   Ms.            Albert         Brunson       N                                15              10           1973   JORDAN                         [email protected]                             2452641
  • tail
tabli data tail --limit 10 [email protected]
The last 10 rows of the data resource ([email protected]):
c_customer_sk   c_customer_id      c_current_cdemo_sk   c_current_hdemo_sk   c_current_addr_sk   c_first_shipto_date_sk   c_first_sales_date_sk   c_salutation   c_first_name   c_last_name   c_preferred_cust_flag   c_birth_day   c_birth_month   c_birth_year   c_birth_country   c_login   c_email_address                      c_last_review_date_sk
-------------   ----------------   ------------------   ------------------   -----------------   ----------------------   ---------------------   ------------   ------------   -----------   ---------------------   -----------   -------------   ------------   ---------------   -------   ----------------------------------   ---------------------
          991   AAAAAAAAPNDAAAAA               431980                 5803                 226                  2451020                 2450990   Sir            William        Aleman        Y                                 7               1           1963   LUXEMBOURG                  [email protected]                   2452366
          992   AAAAAAAAAODAAAAA              1583939                 3697                 855                  2449154                 2449124   Mrs.           Elnora         Dabney        N                                20              10           1984   ITALY                       [email protected]                   2452344
          993   AAAAAAAABODAAAAA               134778                  298                 418                  2450228                 2450198   Mr.            Joseph         Fountain      Y                                 7               4           1942   PERU                        [email protected]                 2452511
          994   AAAAAAAACODAAAAA                                      4792                 294                                                                   Geneva         Archie                                         15               5           1948                               [email protected]                       2452637
          995   AAAAAAAADODAAAAA               330521                 5267                 860                  2452591                 2452561   Sir            Richie         Smith         Y                                14              10           1960   BERMUDA                     [email protected]                       2452612
          996   AAAAAAAAEODAAAAA               951614                  990                 613                  2449734                 2449704   Dr.            Chris          Davis         Y                                24               6           1947   ALBANIA                     [email protected]                              2452570
          997   AAAAAAAAFODAAAAA               626818                 5753                 335                                                    Sir            Harvey                       N                                29               8           1963                               [email protected]                   2452632
          998   AAAAAAAAGODAAAAA              1773352                 3520                  41                  2449992                 2449962   Ms.            Evelyn         Joyner        N                                 3               5           1980   TUVALU                      [email protected]                        2452439
          999   AAAAAAAAHODAAAAA               780031                 5696                 361                  2449771                 2449741   Mrs.           Lisa           Clark         Y                                20               2           1957   ITALY                       [email protected]                          2452646
         1000   AAAAAAAAIODAAAAA               647134                 6138                 295                  2451536                 2451506   Sir            Mark           Bailey        N                                26               8           1947   MOROCCO                     [email protected]                     2452443

Next

In the next step, you will learn how to move data resources

How to transfer data resources

Powered by ComboStrap