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
0 answers

How do I "save" the final sum outside a loop?

s=0 for i in range(7): for j in range(6): for k in range(9): if 1*i+2*j+3*k == 17: s=s+i+j+k else: print(s) # prints a positive integer, not 0 as it had before first problem solved Is there a more…
0
votes
1 answer

scoobi concatenate DLists issue

I have a scala scoobi code (that i execute locally for now) of the following structure: def run() = { val myvalue1 = processSource.source1("mypath/inputData/", references) // has several subfolders with input files that should be processed and…
dadam
  • 181
  • 1
  • 1
  • 6
0
votes
1 answer

identifying duplicates withing a partition with different ID's

i am new to SQL and Data analysis. I have a scenario i am trying to identify using SQL partitions. Basically i want to find duplicates [same first_name, last_name, suffix code and Zip code but only if the id's are different. This query gives me only…
user3002581
  • 3
  • 1
  • 4
0
votes
1 answer

Trying to use Row over by partition to group data

I am trying to get the number of stores per week that had zero sales on products but I am doing something wrong with the row over by partition function. This is my code: IF object_id('tempdb..#All', 'U') IS NOT NULL DROP TABLE #All; IF…
0
votes
1 answer

Using USB Drive as Boot Drive and Storage

I have a 32GB USB drive that I am trying to use as both a boot drive for a ChromeOS version available from here, and to use the remaining space on the drive as I normally would, just for storage to be accessed via Windows or hopefully the…
user2225282
0
votes
1 answer

Slow loading of partitioned Hive table

I'm loading a table in Hive thats partitioned by date. It currently contains about 3 years worth of records, so circa 900 partitions (i.e. 365*3). I'm loading daily deltas into this table, adding an additional partition per day. I achieve this using…
0
votes
1 answer

How to get cumulative sum by group

Here is desired result : At ID=14, I need to reset cum value add with new cum_value. SQL : (fiddle : http://sqlfiddle.com/#!6/62f01/14)
user2286756
  • 211
  • 1
  • 2
  • 11
0
votes
1 answer

QuickSort (select) method, ArrayIndex out of bounds error

I am working on a coms assignment and have hit a huge wall. We are working with quicksort / partition. /** * An implementation of the SELECT algorithm of Figure 1 of the project * specification. Returns the ith order statistic in the subarray *…
Loomiss
  • 11
  • 1
  • 1
  • 6
0
votes
1 answer

SQL Aggregate functions with groupings

I need to create some checks to make sure that students are enrolled in the correct courses with the correct number of units. Here is my SQL at the moment. SELECT StudentID ,AssessmentCode ,BoardCode ,BoardCategory ,BoardUnits …
David Phillips
  • 51
  • 1
  • 1
  • 7
0
votes
2 answers

partition table in hive

I have some logs that I processed, then I will store this information in a table in hive. I will partitioned in weeks so in the first week I have 7 files (one per day). Then If I want to know what do some Person in a day can this partition help me?…
sonia
  • 167
  • 2
  • 2
  • 10
0
votes
1 answer

Netezza SQL: Specify an offset in a window frame

When making the "frame" for a windowed analytic function, one can specify a literal number of rows to "look back" over. E.g., the following will get the trailing 26 weeks weekly sales for a households. ,sum(sales) over (partition by household_id…
Chris
  • 1,421
  • 3
  • 18
  • 31
0
votes
1 answer

[SSAS CUBE Partition Strategy for large historical data]

I have a big cube with 2.5 million new data per day. 19 million a week. Those data are historical data, no update , no remove and no change.So what's best partition strategy for this kind of data ? You can see only one week there are a lot of data.…
ewan
  • 73
  • 3
  • 12
0
votes
3 answers

How To Create A Folder In C# Without Usernames and Drive Partition Affecting It

While creating a folder / file is really easy, just last night I decided to test my application on a different computer. In that application I do create a specific directory. As I expected on the different computer it didn't quite work. A file path…
0
votes
2 answers

Delete rows using table partition

I have a huge log table which is very busy in saving the user logs. My task is to schedule a job which keeps the last 3 days log or last 50k rows (whichever is greater) and deletes the rest. Shall this can be done through TABLE PARTITION.? I can't…
0
votes
1 answer

Reading partition/directory /storage/extSdCard as a file, byte by byte. Android

I've got problem with this code which is working on windows machine with sdcard connected, but wont work on android. Does anyone know how to read sdcard as a single file byte by byte? I'd like to read all bytes from partition. public void…
raf
  • 3
  • 2