Uploaded image for project: 'DataFu'
  1. DataFu
  2. DATAFU-127

New macro - samply by keys

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0

    Description

      Two macros that return a sample of a larger table based on a list of keys, with the schema of the larger table. One of the macros filters by dates, the other doesn't.

      If there are multiple rows with a key that appears in the key list, all of them will be returned (no deduplication is done). The results are returned ordered by the key field in a single file.

      The implementation uses a replicated join for efficiency, but this means the key list shouldn't be too large as to not fit in memory.

      The first macro's definition looks as follows:

      DEFINE sample_by_keys(table, sample_set, join_key_table, join_key_sample) returns out {

      • table_name - table name to sample
      • sample_set - a set of keys
      • join_key_table - join column name in the table
      • join_key_sample - join column name in the sample

      Attachments

        1. DATAFU-127.patch
          6 kB
          Eyal Allweil

        Activity

          People

            eyal Eyal Allweil
            eyal Eyal Allweil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: