Reading\Writing Different file format in HDFS by using pyspark

Issue – How to read\write different file format in HDFS by using pyspark File Format Action Procedure example without compression text File Read sc.textFile() orders = sc.textFile(“/user/BDD/navnit/data-master/retail_db/orders”) Write rdd.saveAsTextFile() orders.saveAsTextFile(“/user/BDD/navnit/saveTextFile/orders”) sequence File Read sc.sequenceFile(ordersSF = sc.sequenceFile(‘/user/BDD/navnit/saveSequenceFile/orders’) Write PipelinedRDD.saveAsSequenceFile() ordersKV.saveAsSequenceFile(‘/user/BDD/navnit/saveSequenceFile/orders’) Avro file Read sqlContext.read.format(“com.databricks.spark.avro”).load() orders = sqlContext.read.format(“com.databricks.spark.avro”).load(“/home/BDD/navnit/orders/”) Write dataFram.write.format(“com.databricks.spark.avro”).save() orders.write.format(“com.databricks.spark.avro”).save(“/user/BDD/navnit/saveAvroFile/orders”) Parquet File Read sqlContext.read.parquet() ordersParquet =… Read More Reading\Writing Different file format in HDFS by using pyspark

Cannot resolve the collation conflict between “xxx” and “xxx” in the equal to operation

Issue – Customer was getting below error when he was running any query. Msg 468, Level 16, State 9, Line 36 Cannot resolve the collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “SQL_Latin1_General_CP1_CS_AS” in the equal to operation. Back ground – Table was part of replication and when he was running query on subscribe he was getting collation conflict… Read More Cannot resolve the collation conflict between “xxx” and “xxx” in the equal to operation

Login failed for user ‘xxx’. Reason: Server is in single user mode. Only one administrator can connect at this time.

Issue – Login failed for user ‘xxx’. Reason: Server is in single user mode. Only one administrator can connect at this time. Cause – Ensure SQL Server is not running in Single user mode by checking start-up parameter. if you see -m; it mean your SQL is running with single user mode. -m : Starts an… Read More Login failed for user ‘xxx’. Reason: Server is in single user mode. Only one administrator can connect at this time.