Questions tagged [partition]

Use this tag for questions about code that partitions data, memory, virtual machines, databases or disks.

In computing, partition may refer to

  • Disk partitioning, the division of a hard disk drive
  • Partition (database), the division of a database
  • Logical partition (virtual computing platform) (LPAR), a subset of a computer's resources, virtualized as a separate computer
  • Memory partition, a subdivision of a computer's memory, usually for use by a single job
  • Binary space partitioning

source: https://en.wikipedia.org/wiki/Partition

Note that non-programming questions about database partitioning are likely to be better received on Database Administrators and disk partitioning on Server Fault.

1547 questions
0
votes
1 answer

Dividing data sets into testing and training data

I have a dataset with k examples and I want to partition into m sets. How can I do it programmatically. For example, if k = 5 and m = 2, therefore, 5 / 2 = 2.5 How do I partition it into the 2 and 3, and not 2, 2 and 1? Similarly, if k = 10 and m =…
Amey Kelkar
  • 155
  • 2
  • 12
0
votes
0 answers

Visual studio list/search for partitions

I have partitioned my usb drive to look like a cd (partition A) and a normal thumb drive(partition B). I want the cd(A) to auto run a visual studio program that will look for the other partition on my thumb drive(B) and launch another visual studio…
0
votes
1 answer

Create an external table in HIVE with multiple sources

I want to create an external table in HIVE which takes input from multiple databases. Eg: I want to create bigTable (A,B,C,D,E,F) with sources coming from db1.table1(A,B) and db2.table2(C,D,E,F,A) Also, the bigTable has to update when db1.table1…
underwood
  • 845
  • 2
  • 11
  • 22
0
votes
1 answer

Calculate number of groups and group size with multiple criteria

My data looks like this: I need to calculate the last two columns (noofgrp and grpsize) No of Groups (count of Clientid) and Group Size (number of clients in each group) according to begtim and endtime. So I tried the following in the first Temp…
0
votes
0 answers

Using a dummy variable to keep a count

I have a user (X) who has been sent 15 emails. There is a field called Opened which is 1 or 0 depending if he opened the emails. I want to work down the list (ordered by date) and start a count each time I get to zero i.e. count each time he gets…
Kathy
  • 1
  • 1
0
votes
2 answers

How to apply Partition on hive table which is already partitioned

How to apply Partition on hive table which is already partitioned. I am not able to fetch the partitioned data into the folder after the data is loaded.
0
votes
1 answer

Kafka partitions meaning

When we decide about partitions, should we do that on per-topic base, or it is topic-wide decision? If T1 partitioned on 3 partitions, and T2 partitioned on 2 partitions, can they both be consumed by 1 consumer? Or it is better make equal number…
Vladimir Nabokov
  • 1,797
  • 1
  • 14
  • 19
0
votes
0 answers

Partition method when using a quicksort for array of integers

I want to be able to sort an array of integers using a QuickSort algorithm but I'm having trouble with my partition method and making use of the pivot. Here is my code with a test method at the bottom. public class QuickSort { public static void…
JWinter
  • 11
  • 2
0
votes
1 answer

SAS: Stack files after checking that they exist

I am going through a bunch of files that are partitioned by calendar year and other variables. What I wanted to do is to partition them by fiscal year (based on a date variable that exists on the records). For example, to create FY2010 file, I would…
0
votes
0 answers

Issue with edge cases in Quicksort C++

I'm writing a program for a class that requires I sort a list of strings representing decimal numbers. I converted the first 19 digits of each string to unsigned long long, and left the remaining digits as string's, for use only if two unsigned long…
Alpaca
  • 9
  • 1
0
votes
1 answer

NoMethodError: Undefined Method When Using Partition Enumerable

I read about the Ruby Enumerable partition and wanted to refactor my credit card validator project include it. class CreditCheck attr_reader :number, :flipped, :split def initialize(number) @number = number.split("").map { |s| s.to_i} end …
0
votes
3 answers

Oracle SQL pull data for a selected date from a table that is daily partitioned

What I like to do is to pull a data set only for busy hour on every Friday for 1 year period. I have used the following query: select to_char(datetimelocal,'DD/MM/YYYY HH24:MI:SS'), colA,colB,colC,colD from Schema_X.Table_Y where DATETIMELOCAL…
notilas
  • 2,323
  • 4
  • 23
  • 36
0
votes
0 answers

Partitioning using dynamic values from table - Oracle 11gR2

I want to create a table with partitioning that automatically adds a partition via a column name. E.g. Phone numbers (should only take distinct values) and as new numbers are added to the column, the partition should create a partition (with the…
0
votes
2 answers

sql max partition by to get other column value

I want get Code for each AccountNo using most recent CreatedDate, and show in CurrentCode. |ID| RoutingNo| AccountNo| Code |CreatedDate |CurrentCode | 1| 1 | 1 | GW03 |2012-02-09 | | 2| 1 | 1 | GW03 |2012-02-10 | |…
0
votes
1 answer

How to load a particular partition of a Hive table into another Hive table with no partitions?

HiveTable1 has columns name, email in partition date=12/12/2014 There are other date partitions in the table as well. HiveTable2 is created with name, email columns. How do I transfer the data from HiveTable1 to HiveTable2?
proutray
  • 1,943
  • 3
  • 30
  • 48